Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: build/config/mac/mac_sdk.gni

Issue 2412353003: Remove direct references to hermetic mac toolchain. (Closed)
Patch Set: Remove unused import. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/config/mac/rules.gni » ('j') | tools/clang/scripts/update.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/toolchain/toolchain.gni")
6 7
7 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=5453. 8 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=5453.
8 # We can drop the rtc_require_mac_10_7_deployment flag when Chromium 9 # We can drop the rtc_require_mac_10_7_deployment flag when Chromium
9 # also requires a 10.7 deployment target. 10 # also requires a 10.7 deployment target.
10 import("//build_overrides/build.gni") 11 import("//build_overrides/build.gni")
11 12
12 declare_args() { 13 declare_args() {
13 # Minimum supported version of the Mac SDK. 14 # Minimum supported version of the Mac SDK.
14 mac_sdk_min = mac_sdk_min_build_override 15 mac_sdk_min = mac_sdk_min_build_override
15 16
(...skipping 15 matching lines...) Expand all
31 # host (they are not shipped) --- this is required as Chrome on iOS is usually 32 # host (they are not shipped) --- this is required as Chrome on iOS is usually
32 # build with the latest version of Xcode that may not ship with the version of 33 # build with the latest version of Xcode that may not ship with the version of
33 # the macOS SDK used to build Chrome on mac. 34 # the macOS SDK used to build Chrome on mac.
34 # TODO(crbug.com/635745): the check for target_os should be replaced by a 35 # TODO(crbug.com/635745): the check for target_os should be replaced by a
35 # check that current_toolchain is default_toolchain, and the file should 36 # check that current_toolchain is default_toolchain, and the file should
36 # assert that current_os is "mac" once this file is no longer included by 37 # assert that current_os is "mac" once this file is no longer included by
37 # iOS toolchains. 38 # iOS toolchains.
38 _verify_sdk = is_chrome_branded && is_official_build && target_os != "ios" 39 _verify_sdk = is_chrome_branded && is_official_build && target_os != "ios"
39 40
40 find_sdk_args = [ "--print_sdk_path" ] 41 find_sdk_args = [ "--print_sdk_path" ]
42 if (!use_system_xcode) {
43 find_sdk_args += [
44 "--developer_dir",
45 hermetic_xcode_path,
46 ]
47 }
41 if (_verify_sdk) { 48 if (_verify_sdk) {
42 find_sdk_args += [ 49 find_sdk_args += [
43 "--verify", 50 "--verify",
44 mac_sdk_min, 51 mac_sdk_min,
45 "--sdk_path=" + mac_sdk_path, 52 "--sdk_path=" + mac_sdk_path,
46 ] 53 ]
47 } else { 54 } else {
48 find_sdk_args += [ mac_sdk_min ] 55 find_sdk_args += [ mac_sdk_min ]
49 } 56 }
50 57
51 # The tool will print the SDK path on the first line, and the version on the 58 # The tool will print the SDK path on the first line, and the version on the
52 # second line. 59 # second line.
53 find_sdk_lines = 60 find_sdk_lines =
54 exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines") 61 exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines")
55 mac_sdk_version = find_sdk_lines[1] 62 mac_sdk_version = find_sdk_lines[1]
56 if (mac_sdk_path == "") { 63 if (mac_sdk_path == "") {
57 mac_sdk_path = find_sdk_lines[0] 64 mac_sdk_path = find_sdk_lines[0]
58 } 65 }
59 66
60 script_name = "//build/config/mac/sdk_info.py" 67 script_name = "//build/config/mac/sdk_info.py"
61 _mac_sdk_result = exec_script(script_name, [ mac_sdk_name ], "scope") 68 sdk_info_args = []
62 mac_sdk_build = _mac_sdk_result.sdk_build 69 if (!use_system_xcode) {
70 sdk_info_args += [
71 "--developer_dir",
72 hermetic_xcode_path,
73 ]
74 }
75 sdk_info_args += [ mac_sdk_name ]
76
77 _mac_sdk_result = exec_script(script_name, sdk_info_args, "scope")
63 xcode_version = _mac_sdk_result.xcode_version 78 xcode_version = _mac_sdk_result.xcode_version
64 xcode_build = _mac_sdk_result.xcode_build 79 xcode_build = _mac_sdk_result.xcode_build
65 machine_os_build = _mac_sdk_result.machine_os_build 80 machine_os_build = _mac_sdk_result.machine_os_build
66 81
67 if (mac_sdk_version != mac_sdk_min_build_override && 82 if (mac_sdk_version != mac_sdk_min_build_override &&
68 exec_script("//build/check_return_value.py", 83 exec_script("//build/check_return_value.py",
69 [ 84 [
70 "test", 85 "test",
71 xcode_version, 86 xcode_version,
72 "-ge", 87 "-ge",
73 "0730", 88 "0730",
74 ], 89 ],
75 "value") != 1) { 90 "value") != 1) {
76 print( 91 print(
77 "************************************************************************* *******") 92 "************************************************************************* *******")
78 print( 93 print(
79 " WARNING: The Mac OS X SDK is incompatible with the version of Xcode. To fix,") 94 " WARNING: The Mac OS X SDK is incompatible with the version of Xcode. To fix,")
80 print( 95 print(
81 " either upgrade Xcode to the latest version or install the Mac O S X") 96 " either upgrade Xcode to the latest version or install the Mac O S X")
82 print( 97 print(
83 " $mac_sdk_min_build_override SDK. For more information, see http s://crbug.com/620127.") 98 " $mac_sdk_min_build_override SDK. For more information, see http s://crbug.com/620127.")
84 print() 99 print()
85 print(" Current SDK Version: $mac_sdk_version") 100 print(" Current SDK Version: $mac_sdk_version")
86 print(" Current Xcode Version: $xcode_version ($xcode_build)") 101 print(" Current Xcode Version: $xcode_version ($xcode_build)")
87 print( 102 print(
88 "************************************************************************* *******") 103 "************************************************************************* *******")
89 assert(false, "SDK is incompatible with Xcode") 104 assert(false, "SDK is incompatible with Xcode")
90 } 105 }
OLDNEW
« no previous file with comments | « no previous file | build/config/mac/rules.gni » ('j') | tools/clang/scripts/update.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698