Chromium Code Reviews| Index: build/config/sysroot.gni |
| diff --git a/build/config/linux/sysroot.gni b/build/config/sysroot.gni |
| similarity index 60% |
| rename from build/config/linux/sysroot.gni |
| rename to build/config/sysroot.gni |
| index 4d14915ecdebb6d8c3c7856199b9ea28647cffe0..a448550679f6e35fc20d08f37bfc47efce80e927 100644 |
| --- a/build/config/linux/sysroot.gni |
| +++ b/build/config/sysroot.gni |
| @@ -19,9 +19,23 @@ if (is_linux && is_chrome_branded && is_official_build && !is_chromeos) { |
| sysroot = "" |
| } |
| } else if (is_mac) { |
| + declare_args() { |
|
brettw
2014/01/08 00:24:20
I think this should go in a separate mac SDK .gni
bbudge
2014/01/08 01:13:15
Done.
|
| + # Minimum supported version of the Mac SDK. |
| + mac_sdk_min = "10.6" |
| + |
| + # Path to the Mac SDKs, not including a backslash at the end. |
| + mac_sdk_path = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" |
| + } |
| + |
| # Set which SDK to use. |
| - # TODO(brettw) this needs to be configurable somehow. |
| - sysroot = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" |
| + if (is_chrome_branded && is_official_build) { |
| + find_sdk_args = ["--verify", mac_sdk_min "--sdk_path=" + mac_sdk_path] |
| + } else { |
| + find_sdk_args = [mac_sdk_min] |
| + } |
| + mac_sdk_version = |
| + exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines") |
| + sysroot = mac_sdk_path + "/MacOSX" + mac_sdk_version[0] + ".sdk" |
| } else { |
| sysroot = "" |
| } |