aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-06-28 21:40:11 +0200
committerGravatar Marcel Hlopko <hlopko@google.com>2017-06-29 09:33:34 +0200
commitc73b15919f7215483d35983e89c5702b2a41f2af (patch)
treef3d44b19bea416e156c55316eac1d06a33a39419 /src/main
parent36a1f0e1210a920c6850d786fd5321b4ac562867 (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
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/CrosstoolCompilationSupport.java2
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()) {