diff options
author | 2017-10-17 08:53:20 +0200 | |
---|---|---|
committer | 2017-10-18 10:28:03 +0200 | |
commit | aae614aa45f17ad3932aec59d52d6bc7074d814d (patch) | |
tree | fc2cba25062525c83bce6e7c7f73119b9800d7a9 /src/main/java/com/google/devtools/build/lib/rules/apple | |
parent | c35fe50e9210d10aba2fb578e46d8203c8451adb (diff) |
Remove the target_apple_env and the apple_host_system_env methods from ctx.fragments.apple .
Progress towards #3424.
RELNOTES[INC]: the target_apple_env and apple_host_system_env methods on ctx.fragments.apple are not supported anymore. The same information is accessible through apple_common.target_apple_env and apple_common.apple_host_system_env . They need the Xcode configuration as an argument, which can be obtained by declaring an implicit dependency on it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) and then calling e.g. apple_common.apple_host_system_env(ctx.attr._xcode_config[apple_common.XcodeVersionConfig]).
PiperOrigin-RevId: 172430475
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/apple')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java | 68 |
1 files changed, 0 insertions, 68 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 cc77b96018..c445d1710f 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 @@ -204,53 +204,6 @@ public class AppleConfiguration extends BuildConfiguration.Fragment { /** - * Returns the SDK version for a platform (whether they be for simulator or device). This is - * directly derived from command line args. - * - * @deprecated use {@link XcodeConfig#getSdkVersionForPlatform(RuleContext, ApplePlatform)} - */ - @Deprecated - // Bug tracking the removal of this method: https://github.com/bazelbuild/bazel/issues/3424 - private DottedVersion getSdkVersionForPlatform(ApplePlatform platform) { - switch (platform) { - case IOS_DEVICE: - case IOS_SIMULATOR: - return iosSdkVersion; - case TVOS_DEVICE: - case TVOS_SIMULATOR: - return tvosSdkVersion; - case WATCHOS_DEVICE: - case WATCHOS_SIMULATOR: - return watchosSdkVersion; - case MACOS: - return macosSdkVersion; - } - throw new AssertionError(); - - } - - /** - * Returns a map of environment variables (derived from configuration) that should be propagated - * for actions pertaining to the given apple platform. Keys are variable names and values are - * their corresponding values. - * - * @deprecated use {@link #appleTargetPlatformEnv(ApplePlatform, DottedVersion) instead)}. - */ - @Deprecated - @SkylarkCallable( - name = "target_apple_env", - doc = - "Returns a <code>dict</code> of environment variables that should be set for actions " - + "that build targets of the given Apple platform type. For example, this dictionary " - + "contains variables that denote the platform name and SDK version with which to " - + "build. The keys are variable names and the values are their corresponding values." - ) - // Bug tracking the removal of this method: https://github.com/bazelbuild/bazel/issues/3424 - public ImmutableMap<String, String> getTargetAppleEnvironment(ApplePlatform platform) { - return appleTargetPlatformEnv(platform, getSdkVersionForPlatform(platform)); - } - - /** * Returns a map of environment variables (derived from configuration) that should be propagated * for actions pertaining to building applications for apple platforms. These environment * variables are needed to use apple toolkits. Keys are variable names and values are their @@ -270,27 +223,6 @@ public class AppleConfiguration extends BuildConfiguration.Fragment { } /** - * Returns a map of environment variables that should be propagated for actions that build on an - * apple host system. These environment variables are needed by the apple toolchain. Keys are - * variable names and values are their corresponding values. - * - * @deprecated use {@link #getXcodeVersionEnv(DottedVersion)} instead}. - */ - @SkylarkCallable( - name = "apple_host_system_env", - doc = - "Returns a <a href='dict.html'>dict</a> of environment variables that should be set " - + "for actions that need to run build tools on an Apple host system, such as the " - + "version of Xcode that should be used. The keys are variable names and the values " - + "are their corresponding values." - ) - @Deprecated - // Bug tracking the removal of this method: https://github.com/bazelbuild/bazel/issues/3424 - public ImmutableMap<String, String> getAppleHostSystemEnv() { - return getXcodeVersionEnv(xcodeVersion); - } - - /** * Returns a map of environment variables that should be propagated for actions that require a * version of xcode to be explicitly declared. Keys are variable names and values are their * corresponding values. |