diff options
author | Dmitry Shevchenko <dmishe@google.com> | 2017-01-18 21:29:56 +0000 |
---|---|---|
committer | Vladimir Moskva <vladmos@google.com> | 2017-01-19 12:36:45 +0000 |
commit | 42787fe020f46d1deb6f025d44e8c758b8ef54be (patch) | |
tree | c9c7d0992f7a5c9f1e4d0bd5662fcf3116185426 /src/main/java/com/google/devtools/build/lib | |
parent | 7a58fdc827434ce1b872c17cda1b0a0220842387 (diff) |
Set correct ENV variables for macOS builds.
* This allows xcrunwrapper to set the correct SDKROOT when building darwin targets.
--
PiperOrigin-RevId: 144874291
MOS_MIGRATED_REVID=144874291
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java index 1a99f0d388..44e6c90419 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java @@ -284,14 +284,11 @@ public class AppleConfiguration extends BuildConfiguration.Fragment { public Map<String, String> appleTargetPlatformEnv(Platform platform) { ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); - // TODO(cparsons): Avoid setting SDK version for macosx. Until SDK version is - // evaluated for the current configuration xcode version, this would break users who build - // cc_* rules without specifying both xcode_version and macosx_sdk_version build options. - if (platform != Platform.MACOS_X) { - String sdkVersion = getSdkVersionForPlatform(platform).toStringWithMinimumComponents(2); - builder.put(AppleConfiguration.APPLE_SDK_VERSION_ENV_NAME, sdkVersion) - .put(AppleConfiguration.APPLE_SDK_PLATFORM_ENV_NAME, platform.getNameInPlist()); - } + String sdkVersion = getSdkVersionForPlatform(platform).toStringWithMinimumComponents(2); + builder + .put(AppleConfiguration.APPLE_SDK_VERSION_ENV_NAME, sdkVersion) + .put(AppleConfiguration.APPLE_SDK_PLATFORM_ENV_NAME, platform.getNameInPlist()); + return builder.build(); } |