diff options
author | Rumou Duan <rduan@google.com> | 2016-02-05 02:32:24 +0000 |
---|---|---|
committer | David Chen <dzc@google.com> | 2016-02-05 20:52:44 +0000 |
commit | 3c26e05842e7140c5801e1575fc647497a35e022 (patch) | |
tree | 184b84db13012ec52ce7e46dace3cc333504d245 /src/main/java/com/google/devtools/build/lib/rules/apple | |
parent | 3a95f353704dc2f7061e2c0786c2459ac1db0fd1 (diff) |
Move ObjC compilation actions for J2ObjC-translated code from binary level to the edges (J2ObjcAspect and J2ObjcProtoAspect).
RELNOTES[INC]:
ObjC compile actions for J2ObjC-translated code now only has access to headers from the java deps of the associated original java rule.
These compile actions no longer takes the compiler options specified in "copts" attribute on objc_binary/ios_test rules.
J2ObjC dead code removal (enabled through flag "--j2objc_dead_code_removal") now happens *after* ObjC compilation.
--
MOS_MIGRATED_REVID=113910545
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/AppleToolchain.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java index bf55f10a67..1c4b6bf509 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java +++ b/src/main/java/com/google/devtools/build/lib/rules/apple/AppleToolchain.java @@ -170,6 +170,15 @@ public class AppleToolchain { * Base rule definition to be ancestor for rules which may require an xcode toolchain. */ public static class RequiresXcodeConfigRule implements RuleDefinition { + public static final LateBoundLabel<BuildConfiguration> XCODE_CONFIG_LABEL = + new LateBoundLabel<BuildConfiguration>( + AppleCommandLineOptions.DEFAULT_XCODE_VERSION_CONFIG_LABEL, AppleConfiguration.class) { + @Override + public Label getDefault(Rule rule, BuildConfiguration configuration) { + return configuration.getFragment(AppleConfiguration.class).getXcodeConfigLabel(); + } + }; + @Override public RuleClass build(Builder builder, RuleDefinitionEnvironment env) { return builder @@ -178,14 +187,7 @@ public class AppleToolchain { .checkConstraints() .direct_compile_time_input() .cfg(HOST) - .value(new LateBoundLabel<BuildConfiguration>( - AppleCommandLineOptions.DEFAULT_XCODE_VERSION_CONFIG_LABEL, - AppleConfiguration.class) { - @Override - public Label getDefault(Rule rule, BuildConfiguration configuration) { - return configuration.getFragment(AppleConfiguration.class).getXcodeConfigLabel(); - } - })) + .value(XCODE_CONFIG_LABEL)) .build(); } @Override |