From 6140817ad14fbc2a80c9f6e8556657d5156fb1b1 Mon Sep 17 00:00:00 2001 From: Cal Peyser Date: Tue, 14 Mar 2017 14:57:53 +0000 Subject: apple_binary scopes link artifacts using child configuration for --experimental_objc_crosstool=all -- PiperOrigin-RevId: 150066766 MOS_MIGRATED_REVID=150066766 --- .../java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java') 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")); -- cgit v1.2.3