diff options
author | Googler <noreply@google.com> | 2017-06-28 21:40:11 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-06-29 09:33:34 +0200 |
commit | c73b15919f7215483d35983e89c5702b2a41f2af (patch) | |
tree | f3d44b19bea416e156c55316eac1d06a33a39419 | |
parent | 36a1f0e1210a920c6850d786fd5321b4ac562867 (diff) |
Make sure that objc_ and apple_binary pass the host/nonhost feature flag for
parity with the cc_ rules.
RELNOTES:None.
PiperOrigin-RevId: 160438691
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/CrosstoolCompilationSupport.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/CrosstoolCompilationSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/CrosstoolCompilationSupport.java index d87616a1ad..2ae34b164a 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/CrosstoolCompilationSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/CrosstoolCompilationSupport.java @@ -440,6 +440,7 @@ public class CrosstoolCompilationSupport extends CompilationSupport { private FeatureConfiguration getFeatureConfiguration(RuleContext ruleContext, BuildConfiguration configuration) { + boolean isHost = ruleContext.getConfiguration().isHostConfiguration(); ImmutableSet.Builder<String> activatedCrosstoolSelectables = ImmutableSet.<String>builder() .addAll(ACTIVATED_ACTIONS) @@ -456,6 +457,7 @@ public class CrosstoolCompilationSupport extends CompilationSupport { .add(CppRuleClasses.COMPILE_ACTION_FLAGS_IN_FLAG_SET) .add(CppRuleClasses.DEPENDENCY_FILE) .add(CppRuleClasses.INCLUDE_PATHS) + .add(isHost ? "host" : "nonhost") .add(configuration.getCompilationMode().toString()); if (configuration.getFragment(ObjcConfiguration.class).moduleMapsEnabled()) { |