aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibrary.java
diff options
context:
space:
mode:
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.java6
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"));