aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/nativedeps
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2018-04-12 11:28:24 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-12 11:30:11 -0700
commitd88edfc5e75b76faa4339a409a822d56447a7f27 (patch)
tree4f3879484c52d69a8b1f8d828eece7d29a55c4a9 /src/main/java/com/google/devtools/build/lib/rules/nativedeps
parent1381cf2c24563cac366ed32f17c900f70b953144 (diff)
Make statically linking cpp-runtimes as a crosstool feature.
This cl should result in no user-visible change. It simply sets the feature based on the field in the crosstool proto. A subsequent cl will expose this feature for people to actually use. PiperOrigin-RevId: 192641438
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/nativedeps')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java b/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java
index d8ddf994d9..5121bd1752 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java
@@ -234,11 +234,15 @@ public abstract class NativeDepsHelper {
featureConfiguration,
cppSemantics);
if (useDynamicRuntime) {
- builder.setRuntimeInputs(ArtifactCategory.DYNAMIC_LIBRARY,
- toolchain.getDynamicRuntimeLinkMiddleman(), toolchain.getDynamicRuntimeLinkInputs());
+ builder.setRuntimeInputs(
+ ArtifactCategory.DYNAMIC_LIBRARY,
+ toolchain.getDynamicRuntimeLinkMiddleman(featureConfiguration),
+ toolchain.getDynamicRuntimeLinkInputs(featureConfiguration));
} else {
- builder.setRuntimeInputs(ArtifactCategory.STATIC_LIBRARY,
- toolchain.getStaticRuntimeLinkMiddleman(), toolchain.getStaticRuntimeLinkInputs());
+ builder.setRuntimeInputs(
+ ArtifactCategory.STATIC_LIBRARY,
+ toolchain.getStaticRuntimeLinkMiddleman(featureConfiguration),
+ toolchain.getStaticRuntimeLinkInputs(featureConfiguration));
}
ImmutableMap.Builder<Artifact, Artifact> ltoBitcodeFilesMap = new ImmutableMap.Builder<>();
for (LibraryToLink lib : linkerInputs) {
@@ -288,7 +292,8 @@ public abstract class NativeDepsHelper {
List<Artifact> runtimeSymlinks;
if (useDynamicRuntime) {
runtimeSymlinks = new LinkedList<>();
- for (final Artifact runtimeInput : toolchain.getDynamicRuntimeLinkInputs()) {
+ for (final Artifact runtimeInput :
+ toolchain.getDynamicRuntimeLinkInputs(featureConfiguration)) {
final Artifact runtimeSymlink =
ruleContext.getPackageRelativeArtifact(
getRuntimeLibraryPath(ruleContext, runtimeInput), bindirIfShared);