diff options
author | 2017-03-14 14:57:53 +0000 | |
---|---|---|
committer | 2017-03-14 19:50:28 +0000 | |
commit | 6140817ad14fbc2a80c9f6e8556657d5156fb1b1 (patch) | |
tree | a33ca703127bb97611f1f4cb0b4e44506fc2c0a2 /src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java | |
parent | 37c51ae72c5a23af0cd5325b1592057370f5b650 (diff) |
apple_binary scopes link artifacts using child configuration for --experimental_objc_crosstool=all
--
PiperOrigin-RevId: 150066766
MOS_MIGRATED_REVID=150066766
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java index b0183e09e5..e2c04b7608 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java @@ -189,7 +189,8 @@ public abstract class CcLibrary implements RuleConfiguredTargetFactory { // which only happens when some rule explicitly depends on the dynamic library. if (!createDynamicLibrary && !supportsDynamicLinker) { Artifact solibArtifact = - CppHelper.getLinuxLinkedArtifact(ruleContext, LinkTargetType.DYNAMIC_LIBRARY); + CppHelper.getLinuxLinkedArtifact( + ruleContext, ruleContext.getConfiguration(), LinkTargetType.DYNAMIC_LIBRARY); ruleContext.registerAction(new FailAction(ruleContext.getActionOwner(), ImmutableList.of(solibArtifact), "Toolchain does not support dynamic linking")); } else if (!createDynamicLibrary @@ -200,7 +201,8 @@ public abstract class CcLibrary implements RuleConfiguredTargetFactory { // generate an .so with. If that's the case, register a fake generating action to prevent // a "no generating action for this artifact" error. Artifact solibArtifact = - CppHelper.getLinuxLinkedArtifact(ruleContext, LinkTargetType.DYNAMIC_LIBRARY); + CppHelper.getLinuxLinkedArtifact( + ruleContext, ruleContext.getConfiguration(), LinkTargetType.DYNAMIC_LIBRARY); ruleContext.registerAction(new FailAction(ruleContext.getActionOwner(), ImmutableList.of(solibArtifact), "configurable \"srcs\" triggers an implicit .so output " + "even though there are no sources to compile in this configuration")); |