aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/apple
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-10-10 11:41:53 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-10-11 09:57:40 +0200
commit9725c8458d31a769371c75121061c7755bbad9c9 (patch)
treeae699ed0211019ec839be59fceaad6d32bc053bc /src/main/java/com/google/devtools/build/lib/rules/apple
parentc6027447f2ea698982783ca13f018e9851b16444 (diff)
Remove sdk_version_for_platform from ctx.fragments.apple .
Progress towards #3424. RELNOTES[INC]: ctx.fragments.apple.sdk_version_for_platform is not supported anymore. The same information is accessible through the target @bazel_tools//tools/osx:current_xcode_config: point an implicit attribute to it (i.e. attr.label(default=Label("@bazel_tools//tools/osx:current_xcode_config")) then use ctx.attr._xcode_config[apple_common].XcodeVersionConfig].sdk_version_for_platform . PiperOrigin-RevId: 171652446
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.java17
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/apple/XcodeConfig.java8
2 files changed, 2 insertions, 23 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 24a31d67c0..fd39b65fe5 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,29 +204,14 @@ public class AppleConfiguration extends BuildConfiguration.Fragment {
/**
- * Returns the SDK version for ios SDKs (whether they be for simulator or device). This is
- * directly derived from --ios_sdk_version.
- *
- * @deprecated use {@link XcodeConfig#getSdkVersionForPlatform(RuleContext, ApplePlatform)}
- */
- // Bug tracking the removal of this method: https://github.com/bazelbuild/bazel/issues/3424
- @Deprecated public DottedVersion getIosSdkVersion() {
- return getSdkVersionForPlatform(ApplePlatform.IOS_DEVICE);
- }
-
- /**
* 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)}
*/
- @SkylarkCallable(
- name = "sdk_version_for_platform",
- doc = "The version of the platform SDK that will be used to build targets for the given "
- + "platform.")
@Deprecated
// Bug tracking the removal of this method: https://github.com/bazelbuild/bazel/issues/3424
- public DottedVersion getSdkVersionForPlatform(ApplePlatform platform) {
+ private DottedVersion getSdkVersionForPlatform(ApplePlatform platform) {
switch (platform) {
case IOS_DEVICE:
case IOS_SIMULATOR:
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeConfig.java b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeConfig.java
index 0323a05259..9749a9eb80 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeConfig.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/XcodeConfig.java
@@ -353,13 +353,7 @@ public class XcodeConfig implements RuleConfiguredTargetFactory {
XcodeConfigRule.XCODE_CONFIG_ATTR_NAME,
RuleConfiguredTarget.Mode.TARGET,
XcodeConfigProvider.PROVIDER);
- DottedVersion fromProvider = versions.getSdkVersionForPlatform(platform);
- DottedVersion fromConfig = ruleContext.getFragment(AppleConfiguration.class)
- .getSdkVersionForPlatform(platform);
- // This sanity check is there to keep this provider in sync with AppleConfiguration until the
- // latter can be removed. Tracking bug: https://github.com/bazelbuild/bazel/issues/3424
- Preconditions.checkState(fromProvider.equals(fromConfig));
- return fromProvider;
+ return versions.getSdkVersionForPlatform(platform);
}
/**