diff options
author | 2018-04-06 06:20:04 -0700 | |
---|---|---|
committer | 2018-04-06 06:21:09 -0700 | |
commit | 655ed474e5c9ab5fbdec921352a43a80769df6c3 (patch) | |
tree | aa0d8ee867c2a2af9b6e92bd7e551aba473c50e0 /src/main/java/com/google | |
parent | ece8c4ede0b6d3ba9cb41a54233fd4343d14e0e7 (diff) |
Automated rollback of commit 77c5582fa0f5c829df576d9f8d66f4975fe415a6.
PiperOrigin-RevId: 191880445
Diffstat (limited to 'src/main/java/com/google')
14 files changed, 47 insertions, 143 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java index 4364f9ed45..0c626e7340 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaBinaryRule.java @@ -26,7 +26,6 @@ import com.google.devtools.build.lib.packages.Attribute; import com.google.devtools.build.lib.packages.AttributeMap; import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.packages.RuleClass.Builder; -import com.google.devtools.build.lib.rules.cpp.CppConfiguration; import com.google.devtools.build.lib.rules.java.JavaConfiguration; /** @@ -41,7 +40,7 @@ public final class BazelJavaBinaryRule implements RuleDefinition { <code>Main.java</code>, then your name could be <code>Main</code>. <!-- #END_BLAZE_RULE.NAME --> */ return builder - .requiresConfigurationFragments(JavaConfiguration.class, CppConfiguration.class) + .requiresConfigurationFragments(JavaConfiguration.class) /* <!-- #BLAZE_RULE(java_binary).IMPLICIT_OUTPUTS --> <ul> <li><code><var>name</var>.jar</code>: A Java archive, containing the class files and other diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java index 19e9ab806b..16546a03e2 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaTestRule.java @@ -30,7 +30,6 @@ import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.packages.RuleClass.Builder; import com.google.devtools.build.lib.packages.RuleClass.Builder.RuleClassType; import com.google.devtools.build.lib.packages.TriState; -import com.google.devtools.build.lib.rules.cpp.CppConfiguration; import com.google.devtools.build.lib.rules.java.JavaConfiguration; import com.google.devtools.build.lib.rules.java.JavaSemantics; @@ -51,7 +50,7 @@ public final class BazelJavaTestRule implements RuleDefinition { </ul> <!-- #END_BLAZE_RULE.IMPLICIT_OUTPUTS --> */ return builder - .requiresConfigurationFragments(JavaConfiguration.class, CppConfiguration.class) + .requiresConfigurationFragments(JavaConfiguration.class) .setImplicitOutputsFunction(BazelJavaRuleClasses.JAVA_BINARY_IMPLICIT_OUTPUTS) // Proguard can be run over java_test targets using the --java_optimization_mode flag. // Primarily this is intended to help test changes to Proguard. diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java index 5e79a11e18..1791dcfe30 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java @@ -95,7 +95,6 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { private static Runfiles collectRunfiles( RuleContext context, - FeatureConfiguration featureConfiguration, CcToolchainProvider toolchain, CcLinkingOutputs linkingOutputs, CcLinkingOutputs ccLibraryLinkingOutputs, @@ -118,7 +117,7 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { builder.add(context, runfilesMapping); // Add the C++ runtime libraries if linking them dynamically. if (linkStaticness == LinkStaticness.DYNAMIC) { - builder.addTransitiveArtifacts(toolchain.getDynamicRuntimeLinkInputs(featureConfiguration)); + builder.addTransitiveArtifacts(toolchain.getDynamicRuntimeLinkInputs()); } if (linkCompileOutputSeparately) { builder.addArtifacts( @@ -300,17 +299,17 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { if (linkStaticness == LinkStaticness.DYNAMIC) { linkActionBuilder.setRuntimeInputs( ArtifactCategory.DYNAMIC_LIBRARY, - ccToolchain.getDynamicRuntimeLinkMiddleman(featureConfiguration), - ccToolchain.getDynamicRuntimeLinkInputs(featureConfiguration)); + ccToolchain.getDynamicRuntimeLinkMiddleman(), + ccToolchain.getDynamicRuntimeLinkInputs()); } else { linkActionBuilder.setRuntimeInputs( ArtifactCategory.STATIC_LIBRARY, - ccToolchain.getStaticRuntimeLinkMiddleman(featureConfiguration), - ccToolchain.getStaticRuntimeLinkInputs(featureConfiguration)); + ccToolchain.getStaticRuntimeLinkMiddleman(), + ccToolchain.getStaticRuntimeLinkInputs()); // Only force a static link of libgcc if static runtime linking is enabled (which // can't be true if runtimeInputs is empty). // TODO(bazel-team): Move this to CcToolchain. - if (!ccToolchain.getStaticRuntimeLinkInputs(featureConfiguration).isEmpty()) { + if (!ccToolchain.getStaticRuntimeLinkInputs().isEmpty()) { linkActionBuilder.addLinkopt("-static-libgcc"); } } @@ -467,7 +466,6 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory { Runfiles runfiles = collectRunfiles( ruleContext, - featureConfiguration, ccToolchain, linkingOutputs, ccLinkingOutputs, diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java index ddb240bf5a..8db2bd3ba3 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java @@ -704,7 +704,6 @@ public final class CcCommon { ImmutableSet<String> requestedFeatures, ImmutableSet<String> unsupportedFeatures, CcToolchainProvider toolchain) { - ImmutableSet.Builder<String> allRequestedFeaturesBuilder = ImmutableSet.builder(); ImmutableSet.Builder<String> unsupportedFeaturesBuilder = ImmutableSet.builder(); unsupportedFeaturesBuilder.addAll(unsupportedFeatures); unsupportedFeaturesBuilder.addAll(ruleContext.getDisabledFeatures()); @@ -717,13 +716,8 @@ public final class CcCommon { if (toolchain.getCcCompilationContextInfo().getCppModuleMap() == null) { unsupportedFeaturesBuilder.add(CppRuleClasses.MODULE_MAPS); } - if (toolchain.supportsEmbeddedRuntimes()) { - allRequestedFeaturesBuilder.add(CppRuleClasses.STATIC_LINK_CPP_RUNTIMES); - } else { - unsupportedFeaturesBuilder.add(CppRuleClasses.STATIC_LINK_CPP_RUNTIMES); - } - ImmutableSet<String> allUnsupportedFeatures = unsupportedFeaturesBuilder.build(); + ImmutableSet.Builder<String> allRequestedFeaturesBuilder = ImmutableSet.builder(); // If STATIC_LINK_MSVCRT feature isn't specified by user, we add DYNAMIC_LINK_MSVCRT_* feature // according to compilation mode. 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 88e3cb32d1..2bc00bbf5e 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 @@ -66,13 +66,10 @@ public abstract class CcLibrary implements RuleConfiguredTargetFactory { CppFileTypes.ALWAYS_LINK_LIBRARY, CppFileTypes.ALWAYS_LINK_PIC_LIBRARY, CppFileTypes.SHARED_LIBRARY, CppFileTypes.VERSIONED_SHARED_LIBRARY); - private static Runfiles collectRunfiles( - RuleContext context, - FeatureConfiguration featureConfiguration, + private static Runfiles collectRunfiles(RuleContext context, CcLinkingOutputs ccLinkingOutputs, CcToolchainProvider ccToolchain, - boolean neverLink, - boolean addDynamicRuntimeInputArtifactsToRunfiles, + boolean neverLink, boolean addDynamicRuntimeInputArtifactsToRunfiles, boolean linkingStatically) { Runfiles.Builder builder = new Runfiles.Builder( context.getWorkspaceName(), context.getConfiguration().legacyExternalRunfiles()); @@ -86,7 +83,7 @@ public abstract class CcLibrary implements RuleConfiguredTargetFactory { builder.addDataDeps(context); if (addDynamicRuntimeInputArtifactsToRunfiles) { - builder.addTransitiveArtifacts(ccToolchain.getDynamicRuntimeLinkInputs(featureConfiguration)); + builder.addTransitiveArtifacts(ccToolchain.getDynamicRuntimeLinkInputs()); } return builder.build(); } @@ -317,24 +314,10 @@ public abstract class CcLibrary implements RuleConfiguredTargetFactory { } NestedSet<Artifact> filesToBuild = filesBuilder.build(); - Runfiles staticRunfiles = - collectRunfiles( - ruleContext, - featureConfiguration, - linkingOutputs, - ccToolchain, - neverLink, - addDynamicRuntimeInputArtifactsToRunfiles, - true); - Runfiles sharedRunfiles = - collectRunfiles( - ruleContext, - featureConfiguration, - linkingOutputs, - ccToolchain, - neverLink, - addDynamicRuntimeInputArtifactsToRunfiles, - false); + Runfiles staticRunfiles = collectRunfiles(ruleContext, linkingOutputs, ccToolchain, + neverLink, addDynamicRuntimeInputArtifactsToRunfiles, true); + Runfiles sharedRunfiles = collectRunfiles(ruleContext, linkingOutputs, ccToolchain, + neverLink, addDynamicRuntimeInputArtifactsToRunfiles, false); List<Artifact> instrumentedObjectFiles = new ArrayList<>(); instrumentedObjectFiles.addAll(compilationInfo.getCcCompilationOutputs().getObjectFiles(false)); diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java index 3b85d35add..12257baa8d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLinkingHelper.java @@ -880,8 +880,8 @@ public final class CcLinkingHelper { .addLinkopts(sonameLinkopts) .setRuntimeInputs( ArtifactCategory.DYNAMIC_LIBRARY, - ccToolchain.getDynamicRuntimeLinkMiddleman(featureConfiguration), - ccToolchain.getDynamicRuntimeLinkInputs(featureConfiguration)) + ccToolchain.getDynamicRuntimeLinkMiddleman(), + ccToolchain.getDynamicRuntimeLinkInputs()) .addVariablesExtensions(variablesExtensions); if (featureConfiguration.isEnabled(CppRuleClasses.TARGETS_WINDOWS)) { diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java index 4c44cebf53..fd7b607c51 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainProvider.java @@ -29,7 +29,6 @@ import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order; import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; import com.google.devtools.build.lib.events.Location; -import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.FeatureConfiguration; import com.google.devtools.build.lib.rules.cpp.CcToolchainFeatures.Variables; import com.google.devtools.build.lib.rules.cpp.CppConfiguration.Tool; import com.google.devtools.build.lib.rules.cpp.FdoSupport.FdoMode; @@ -340,51 +339,31 @@ public final class CcToolchainProvider extends ToolchainInfo { } /** - * Returns true if the featureConfiguration includes statically linking the cpp runtimes. - * - * @param featureConfiguration the relevant FeatureConfiguration. + * Returns the static runtime libraries. */ - public boolean shouldStaticallyLinkCppRuntimes(FeatureConfiguration featureConfiguration) { - return featureConfiguration.isEnabled(CppRuleClasses.STATIC_LINK_CPP_RUNTIMES); - } - - /** Returns the static runtime libraries. */ - public NestedSet<Artifact> getStaticRuntimeLinkInputs(FeatureConfiguration featureConfiguration) { - if (shouldStaticallyLinkCppRuntimes(featureConfiguration)) { - return staticRuntimeLinkInputs; - } else { - return NestedSetBuilder.emptySet(Order.STABLE_ORDER); - } + public NestedSet<Artifact> getStaticRuntimeLinkInputs() { + return staticRuntimeLinkInputs; } - /** Returns an aggregating middleman that represents the static runtime libraries. */ - @Nullable - public Artifact getStaticRuntimeLinkMiddleman(FeatureConfiguration featureConfiguration) { - if (shouldStaticallyLinkCppRuntimes(featureConfiguration)) { - return staticRuntimeLinkMiddleman; - } else { - return null; - } + /** + * Returns an aggregating middleman that represents the static runtime libraries. + */ + @Nullable public Artifact getStaticRuntimeLinkMiddleman() { + return staticRuntimeLinkMiddleman; } - /** Returns the dynamic runtime libraries. */ - public NestedSet<Artifact> getDynamicRuntimeLinkInputs( - FeatureConfiguration featureConfiguration) { - if (shouldStaticallyLinkCppRuntimes(featureConfiguration)) { - return dynamicRuntimeLinkInputs; - } else { - return NestedSetBuilder.emptySet(Order.STABLE_ORDER); - } + /** + * Returns the dynamic runtime libraries. + */ + public NestedSet<Artifact> getDynamicRuntimeLinkInputs() { + return dynamicRuntimeLinkInputs; } - /** Returns an aggregating middleman that represents the dynamic runtime libraries. */ - @Nullable - public Artifact getDynamicRuntimeLinkMiddleman(FeatureConfiguration featureConfiguration) { - if (shouldStaticallyLinkCppRuntimes(featureConfiguration)) { - return dynamicRuntimeLinkMiddleman; - } else { - return null; - } + /** + * Returns an aggregating middleman that represents the dynamic runtime libraries. + */ + @Nullable public Artifact getDynamicRuntimeLinkMiddleman() { + return dynamicRuntimeLinkMiddleman; } /** diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java index 97182b1e8f..3b49a4d879 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java @@ -202,11 +202,6 @@ public class CppActionConfigs { " }", " }", "}"), - ifTrue( - !existingFeatureNames.contains(CppRuleClasses.STATIC_LINK_CPP_RUNTIMES), - "feature {", - " name: 'static_link_cpp_runtimes'", - "}"), // Gcc options: // -MD turns on .d file output as a side-effect (doesn't imply -E) // -MM[D] enables user includes only, not system includes diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java index 2b8fd6a2f2..d793a52833 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppHelper.java @@ -358,11 +358,10 @@ public class CppHelper { CppConfiguration config, CcToolchainProvider toolchain, Iterable<String> features, - boolean sharedLib, - boolean shouldStaticallyLinkCppRuntimes) { + Boolean sharedLib) { if (sharedLib) { return toolchain.getSharedLibraryLinkOptions( - shouldStaticallyLinkCppRuntimes + toolchain.supportsEmbeddedRuntimes() ? toolchain.getMostlyStaticSharedLinkFlags( config.getCompilationMode(), config.getLipoMode()) : toolchain.getDynamicLinkFlags(config.getCompilationMode(), config.getLipoMode()), @@ -517,38 +516,6 @@ public class CppHelper { } /** - * Convenience function for finding the dynamic runtime inputs for the current toolchain. Useful - * for non C++ rules that link against the C++ runtime. - */ - public static NestedSet<Artifact> getDefaultCcToolchainDynamicRuntimeInputs( - RuleContext ruleContext) { - CcToolchainProvider defaultToolchain = - getToolchain(ruleContext, CcToolchain.CC_TOOLCHAIN_DEFAULT_ATTRIBUTE_NAME); - if (defaultToolchain == null) { - return NestedSetBuilder.emptySet(Order.STABLE_ORDER); - } - FeatureConfiguration featureConfiguration = - CcCommon.configureFeatures(ruleContext, defaultToolchain); - return defaultToolchain.getDynamicRuntimeLinkInputs(featureConfiguration); - } - - /** - * Convenience function for finding the static runtime inputs for the current toolchain. Useful - * for non C++ rules that link against the C++ runtime. - */ - public static NestedSet<Artifact> getDefaultCcToolchainStaticRuntimeInputs( - RuleContext ruleContext) { - CcToolchainProvider defaultToolchain = - getToolchain(ruleContext, CcToolchain.CC_TOOLCHAIN_DEFAULT_ATTRIBUTE_NAME); - if (defaultToolchain == null) { - return NestedSetBuilder.emptySet(Order.STABLE_ORDER); - } - FeatureConfiguration featureConfiguration = - CcCommon.configureFeatures(ruleContext, defaultToolchain); - return defaultToolchain.getStaticRuntimeLinkInputs(featureConfiguration); - } - - /** * Makes sure that the given info collection has a {@link CcToolchainProvider} (gives an error * otherwise), and returns a reference to that {@link CcToolchainProvider}. The method will only * return {@code null}, if the toolchain attribute is undefined for the rule class. diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java index ae48c95204..3560f6b2d8 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java @@ -224,7 +224,7 @@ public class CppLinkActionBuilder { this.cppConfiguration = configuration.getFragment(CppConfiguration.class); this.toolchain = toolchain; this.fdoSupport = fdoSupport; - if (featureConfiguration.isEnabled(CppRuleClasses.STATIC_LINK_CPP_RUNTIMES)) { + if (toolchain.supportsEmbeddedRuntimes() && toolchain != null) { runtimeSolibDir = toolchain.getDynamicRuntimeSolibDir(); } this.featureConfiguration = featureConfiguration; @@ -711,8 +711,7 @@ public class CppLinkActionBuilder { } else if (mostlyStatic) { result.addAll( CppHelper.getMostlyStaticLinkOptions( - cppConfiguration, toolchain, features, sharedLinkopts, - featureConfiguration.isEnabled(CppRuleClasses.STATIC_LINK_CPP_RUNTIMES))); + cppConfiguration, toolchain, features, sharedLinkopts)); } else { result.addAll( CppHelper.getDynamicLinkOptions(cppConfiguration, toolchain, features, sharedLinkopts)); diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppRuleClasses.java index 40309e822e..2525eb588d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppRuleClasses.java @@ -329,9 +329,6 @@ public class CppRuleClasses { /** A string constant for a feature to dynamically link MSVCRT with debug info on Windows. */ public static final String DYNAMIC_LINK_MSVCRT_DEBUG = "dynamic_link_msvcrt_debug"; - /** A string constant for a feature to statically link the C++ runtimes. */ - public static final String STATIC_LINK_CPP_RUNTIMES = "static_link_cpp_runtimes"; - /** * A string constant for a feature that indicates we are using a toolchain building for Windows. */ diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppToolchainInfo.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppToolchainInfo.java index f244677954..2b5e54c9da 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppToolchainInfo.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppToolchainInfo.java @@ -408,8 +408,6 @@ public final class CppToolchainInfo { linkerToolPath, arToolPath, stripToolPath, - // This should be toolchain-based, rather than feature based, because - // it controls whether or not to declare the feature at all. toolchain.getSupportsEmbeddedRuntimes(), toolchain.getSupportsInterfaceSharedObjects()), toolchainBuilder); diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java index 01124b60d4..870c3b525e 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java @@ -247,7 +247,8 @@ public class JavaBinary implements RuleConfiguredTargetFactory { // Collect the action inputs for the runfiles collector here because we need to access the // analysis environment, and that may no longer be safe when the runfiles collector runs. Iterable<Artifact> dynamicRuntimeActionInputs = - CppHelper.getDefaultCcToolchainDynamicRuntimeInputs(ruleContext); + CppHelper.getToolchainUsingDefaultCcToolchainAttribute(ruleContext) + .getDynamicRuntimeLinkInputs(); Iterables.addAll(jvmFlags, semantics.getJvmFlags(ruleContext, common.getSrcsArtifacts(), userJvmFlags)); 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 5121bd1752..d8ddf994d9 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,15 +234,11 @@ public abstract class NativeDepsHelper { featureConfiguration, cppSemantics); if (useDynamicRuntime) { - builder.setRuntimeInputs( - ArtifactCategory.DYNAMIC_LIBRARY, - toolchain.getDynamicRuntimeLinkMiddleman(featureConfiguration), - toolchain.getDynamicRuntimeLinkInputs(featureConfiguration)); + builder.setRuntimeInputs(ArtifactCategory.DYNAMIC_LIBRARY, + toolchain.getDynamicRuntimeLinkMiddleman(), toolchain.getDynamicRuntimeLinkInputs()); } else { - builder.setRuntimeInputs( - ArtifactCategory.STATIC_LIBRARY, - toolchain.getStaticRuntimeLinkMiddleman(featureConfiguration), - toolchain.getStaticRuntimeLinkInputs(featureConfiguration)); + builder.setRuntimeInputs(ArtifactCategory.STATIC_LIBRARY, + toolchain.getStaticRuntimeLinkMiddleman(), toolchain.getStaticRuntimeLinkInputs()); } ImmutableMap.Builder<Artifact, Artifact> ltoBitcodeFilesMap = new ImmutableMap.Builder<>(); for (LibraryToLink lib : linkerInputs) { @@ -292,8 +288,7 @@ public abstract class NativeDepsHelper { List<Artifact> runtimeSymlinks; if (useDynamicRuntime) { runtimeSymlinks = new LinkedList<>(); - for (final Artifact runtimeInput : - toolchain.getDynamicRuntimeLinkInputs(featureConfiguration)) { + for (final Artifact runtimeInput : toolchain.getDynamicRuntimeLinkInputs()) { final Artifact runtimeSymlink = ruleContext.getPackageRelativeArtifact( getRuntimeLibraryPath(ruleContext, runtimeInput), bindirIfShared); |