Index: build/config/mac/mac_sdk.gni |
diff --git a/build/config/mac/mac_sdk.gni b/build/config/mac/mac_sdk.gni |
index eb0fdda61492d095fc13f6586316e4b11162610f..587f43ddbe337f7f18a487b2f7d0bcab516ab00e 100644 |
--- a/build/config/mac/mac_sdk.gni |
+++ b/build/config/mac/mac_sdk.gni |
@@ -25,8 +25,20 @@ declare_args() { |
mac_sdk_name = "macosx" |
} |
+# Check that the version of macOS SDK used is the one requested when building |
+# a version of Chrome shipped to the users. Disable the check if building for |
+# iOS as the version macOS SDK used is not relevant for the tool build for the |
+# host (they are not shipped) --- this is required as Chrome on iOS is usually |
+# build with the latest version of Xcode that may not ship with the version of |
+# the macOS SDK used to build Chrome on mac. |
+# TODO(crbug.com/635745): the check for target_os should be replaced by a |
+# check that current_toolchain is default_toolchain, and the file should |
+# assert that current_os is "mac" once this file is no longer included by |
+# iOS toolchains. |
+_verify_sdk = is_chrome_branded && is_official_build && target_os != "ios" |
+ |
find_sdk_args = [ "--print_sdk_path" ] |
-if (is_chrome_branded && is_official_build) { |
+if (_verify_sdk) { |
find_sdk_args += [ |
"--verify", |
mac_sdk_min, |