Assert when using FORCE_MAC_TOOLCHAIN and target_os=ios.
iOS no longer uses the hermetic Xcode toolchain. Bug: 939785 Change-Id: I31a28e77a7e2b5b43f3db43c39ada9d9e6757540 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539798 Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Erik Chen <erikchen@chromium.org> Auto-Submit: Justin Cohen <justincohen@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org> Cr-Commit-Position: refs/heads/master@{#644418}
This commit is contained in:
@ -7,6 +7,7 @@
|
||||
Prints "1" if Chrome targets should be built with hermetic Xcode.
|
||||
Prints "2" if Chrome targets should be built with hermetic Xcode, but the OS
|
||||
version does not meet the minimum requirements of the hermetic version of Xcode.
|
||||
Prints "3" if FORCE_MAC_TOOLCHAIN is set for an iOS target_os
|
||||
Otherwise prints "0".
|
||||
|
||||
Usage:
|
||||
@ -28,8 +29,11 @@ def _IsCorpMachine():
|
||||
|
||||
|
||||
def main():
|
||||
force_toolchain = os.environ.get('FORCE_MAC_TOOLCHAIN')
|
||||
if force_toolchain and sys.argv[1] == 'ios':
|
||||
return "3"
|
||||
allow_corp = sys.argv[1] == 'mac' and _IsCorpMachine()
|
||||
if os.environ.get('FORCE_MAC_TOOLCHAIN') or allow_corp:
|
||||
if force_toolchain or allow_corp:
|
||||
if not mac_toolchain.PlatformMeetsHermeticXcodeRequirements():
|
||||
return "2"
|
||||
return "1"
|
||||
|
@ -42,7 +42,7 @@ declare_args() {
|
||||
# This does not affect the compiler. When this variable is false, targets will
|
||||
# instead use a hermetic install of Xcode. [The hermetic install can be
|
||||
# obtained with gclient sync after setting the environment variable
|
||||
# FORCE_MAC_TOOLCHAIN].
|
||||
# FORCE_MAC_TOOLCHAIN for target_os mac only].
|
||||
use_system_xcode = ""
|
||||
}
|
||||
|
||||
@ -54,5 +54,9 @@ if (host_os == "mac" && use_system_xcode == "") {
|
||||
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
|
||||
}
|
||||
|
Reference in New Issue
Block a user