diff options
author | 2018-04-05 10:33:56 -0700 | |
---|---|---|
committer | 2018-04-05 10:35:43 -0700 | |
commit | 77c5582fa0f5c829df576d9f8d66f4975fe415a6 (patch) | |
tree | a838b872ed68f690427863b4a22649572e546959 /src/main/java/com/google/devtools/build/lib/rules/nativedeps | |
parent | 08dda865f6be27cb85f271e8c9343e2135bc412e (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.
DELTA_BY_EXTENSION=java=100,py=15
RELNOTES: None
PiperOrigin-RevId: 191761838
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.java | 15 |
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); |