Allow use of non-default Xcode in GN |
||||||
Issue description
I'd like to be able to run "gn args" and set a variable that allows me to use a non-default Xcode.app. My use case is that I need to compile with multiple SDKs, and I'd like to avoid having separate checkouts. I'd also like to avoid running xcode-select to switch SDKs, because I will inevitably forget to do so.
I tried running "gn args" to override all of the following variables:
ios_sdk_path
ios_sdk_name
ios_sdk_version
ios_sdk_platform
ios_sdk_build
xcode_version
xcode_build
machine_os_build
ios_platform_build
This worked ok for the ios side, but I got the following mac-related error:
Generating files...
ERROR at //build/config/mac/rules.gni:46:23: Undefined identifier in string expansion.
"MAC_SDK_BUILD=$mac_sdk_build",
^------------
"mac_sdk_build" is not currently in scope.
See //build/config/mac/rules.gni:159:3: whence it was called.
mac_info_plist(_info_plist_target) {
^-----------------------------------
See //ui/base/BUILD.gn:949:3: whence it was called.
mac_framework_bundle("ui_unittests_framework") {
^-----------------------------------------------
See //ios/chrome/tools/strings/BUILD.gn:11:5: which caused the file to be included.
"//ui/base:ui_data_pack",
^-----------------------
If I also override mac_sdk_build, I get:
ERROR at //build/toolchain/mac/BUILD.gn:11:1: Value collision.
import("//build/config/mac/mac_sdk.gni")
^--------------------------------------
This import contains "mac_sdk_build"
See //build/config/mac/mac_sdk.gni:51:19: defined here.
mac_sdk_build = _mac_sdk_result.sdk_build
^------------------------
Which would clobber the one in your current scope
See build arg file (use "gn args <out_dir>" to edit):20:17: defined here.
mac_sdk_build = "16A201w"
^--------
Executing import should not conflict with anything in the current
scope unless the values are identical.
See //BUILD.gn:63:1: which caused the file to be included.
group("gn_all") {
^----------------
If I edit build/config/mac/mac_sdk.gni to conditionally set the xcode-related variables, I get:
ERROR at build arg file (use "gn args <out_dir>" to edit):20:17: Build argument has no effect.
mac_sdk_build = "16A201w"
^--------
The variable "mac_sdk_build" was set as a build argument
but never appeared in a declare_args() block in any buildfile.
,
Jun 14 2016
+rsesek
,
Jun 15 2016
[mac triage] Up for grabs
,
Sep 27 2016
,
Sep 28 2016
,
Sep 29 2016
,
Jun 2 2017
Issue 670523 has been merged into this issue. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by rohitrao@chromium.org
, Jun 14 2016