diff options
author | 2015-11-09 18:17:26 +0000 | |
---|---|---|
committer | 2015-11-10 10:23:12 +0000 | |
commit | 15099239d94f5fb94504e33f670adf71dacff48a (patch) | |
tree | c91ff49b78452bf0bc22f6c0ddc825716bf17d4c /src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java | |
parent | 33f819b6b67dcefbf36b4e86a0d3657bcc76cbe2 (diff) |
Create AppleConfiguration and AppleCommandLineOptions, and move a few items of configuration over to the apple package.
This moves a small number of configuration items over. Future changes will mostly likely follow to move yet more items.
The split here is necessary as it is not only objc-related rules which require information about apple platforms and configuration -- cc rules will need this information as well to
pass appropriate args to clang.
--
MOS_MIGRATED_REVID=107396114
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java index 13a46f4f51..260066d955 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/IosApplication.java @@ -21,6 +21,7 @@ import com.google.devtools.build.lib.analysis.RuleConfiguredTargetBuilder; import com.google.devtools.build.lib.analysis.RuleContext; import com.google.devtools.build.lib.analysis.config.BuildOptions; import com.google.devtools.build.lib.packages.Attribute.SplitTransition; +import com.google.devtools.build.lib.rules.apple.AppleConfiguration; import com.google.devtools.build.lib.rules.apple.Platform; import com.google.devtools.build.lib.rules.objc.ReleaseBundlingSupport.SplitArchTransition; import com.google.devtools.build.lib.rules.objc.ReleaseBundlingSupport.SplitArchTransition.ConfigurationDistinguisher; @@ -52,8 +53,8 @@ public class IosApplication extends ReleaseBundlingTargetFactory { protected void configureTarget(RuleConfiguredTargetBuilder target, RuleContext ruleContext, ReleaseBundlingSupport releaseBundlingSupport) throws InterruptedException { // If this is an application built for the simulator, make it runnable. - ObjcConfiguration objcConfiguration = ObjcRuleClasses.objcConfiguration(ruleContext); - if (objcConfiguration.getBundlingPlatform() == Platform.IOS_SIMULATOR) { + AppleConfiguration appleConfiguration = ruleContext.getFragment(AppleConfiguration.class); + if (appleConfiguration.getBundlingPlatform() == Platform.IOS_SIMULATOR) { Artifact runnerScript = ObjcRuleClasses.intermediateArtifacts(ruleContext).runnerScript(); Artifact ipaFile = ruleContext.getImplicitOutputArtifact(ReleaseBundlingSupport.IPA); releaseBundlingSupport.registerGenerateRunnerScriptAction(runnerScript, ipaFile); |