mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-06 21:25:58 +00:00
Using the version in the Chromium repo in order to make use of the .gn files it contains. Doing so also appears to require us to switch where we pull googletest from so that the directory structure matches what the Abseil build config expects. Fortunately this doesn't seem to cause issues in our tests. Bug: dawn:563 Change-Id: I55831ad33f282b3d8b03b67826fd2776e5602d89 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63780 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Brandon Jones <bajones@chromium.org>
48 lines
1.7 KiB
Plaintext
48 lines
1.7 KiB
Plaintext
# Copyright 2018 The Dawn Authors
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
declare_args() {
|
|
# Tell Dawn and dependencies to not do Chromium-specific things
|
|
build_with_chromium = false
|
|
|
|
# In standalone Dawn builds, don't try to use the hermetic install of Xcode
|
|
# that Chromium uses
|
|
use_system_xcode = ""
|
|
|
|
# Android 32-bit non-component, non-clang builds cannot have symbol_level=2
|
|
# due to 4GiB file size limit, see https://crbug.com/648948.
|
|
ignore_elf32_limitations = false
|
|
|
|
# If true, it assumes that //third_party/abseil-cpp is an available
|
|
# dependency for googletest.
|
|
gtest_enable_absl_printers = false
|
|
}
|
|
|
|
# Detect whether we can use the hermetic XCode like in Chromium and do so if
|
|
# possible.
|
|
if (host_os == "mac" && use_system_xcode == "") {
|
|
_result = exec_script("//build/mac/should_use_hermetic_xcode.py",
|
|
[ target_os ],
|
|
"value")
|
|
|
|
assert(_result != 2,
|
|
"Do not allow building targets with the default" +
|
|
"hermetic toolchain if the minimum OS version is not met.")
|
|
assert(_result != 3,
|
|
"iOS does not support building with a hermetic toolchain. " +
|
|
"Please install Xcode.")
|
|
|
|
use_system_xcode = _result != 1
|
|
}
|