aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
diff options
context:
space:
mode:
authorGravatar Marcel Hlopko <hlopko@google.com>2016-12-09 15:32:56 +0000
committerGravatar Irina Iancu <elenairina@google.com>2016-12-09 15:52:53 +0000
commit0ca9d7ee67bdf9d5e073bd7b4530c6fd0915beea (patch)
treeb1d7d12ccaa3f7d448953159eb8addfa63575153 /src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
parentd061a5d2c03031da11e8d5c126a69f55661dc224 (diff)
Simplify propagation of linker params by replacing global_whole_archive with
individual --whole_archive/--no_whole_archive blocks. -- PiperOrigin-RevId: 141555295 MOS_MIGRATED_REVID=141555295
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
index 0cb237e113..145088e321 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
@@ -73,7 +73,6 @@ public final class LinkCommandLine extends CommandLine {
@Nullable private final PathFragment runtimeSolibDir;
private final boolean nativeDeps;
private final boolean useTestOnlyFlags;
- private final List<String> noWholeArchiveFlags;
@Nullable private final Artifact paramFile;
@@ -96,9 +95,7 @@ public final class LinkCommandLine extends CommandLine {
@Nullable PathFragment runtimeSolibDir,
boolean nativeDeps,
boolean useTestOnlyFlags,
- boolean needWholeArchive,
@Nullable Artifact paramFile,
- List<String> noWholeArchiveFlags,
CcToolchainFeatures.Variables variables,
@Nullable FeatureConfiguration featureConfiguration) {
@@ -126,7 +123,6 @@ public final class LinkCommandLine extends CommandLine {
this.nativeDeps = nativeDeps;
this.useTestOnlyFlags = useTestOnlyFlags;
this.paramFile = paramFile;
- this.noWholeArchiveFlags = noWholeArchiveFlags;
}
@Nullable
@@ -380,14 +376,12 @@ public final class LinkCommandLine extends CommandLine {
case EXECUTABLE:
argv.add(cppConfiguration.getCppExecutable().getPathString());
argv.addAll(featureConfiguration.getCommandLine(actionName, variables));
- argv.addAll(noWholeArchiveFlags);
addToolchainFlags(argv);
break;
case DYNAMIC_LIBRARY:
argv.add(toolPath);
argv.addAll(featureConfiguration.getCommandLine(actionName, variables));
- argv.addAll(noWholeArchiveFlags);
addToolchainFlags(argv);
break;
@@ -401,7 +395,6 @@ public final class LinkCommandLine extends CommandLine {
argv.addAll(cppConfiguration.getArFlags());
argv.add(output.getExecPathString());
argv.addAll(featureConfiguration.getCommandLine(actionName, variables));
- argv.addAll(noWholeArchiveFlags);
break;
// Since the objc case is not hardcoded in CppConfiguration, we can use the actual tool.
@@ -417,7 +410,6 @@ public final class LinkCommandLine extends CommandLine {
default:
throw new IllegalArgumentException();
}
-
return argv;
}
@@ -641,12 +633,10 @@ public final class LinkCommandLine extends CommandLine {
@Nullable private PathFragment runtimeSolibDir;
private boolean nativeDeps;
private boolean useTestOnlyFlags;
- private boolean needWholeArchive;
@Nullable private Artifact paramFile;
@Nullable private CcToolchainProvider toolchain;
private Variables variables;
private FeatureConfiguration featureConfiguration;
- private List<String> noWholeArchiveFlags = ImmutableList.of();
// This interface is needed to support tests that don't create a
// ruleContext, in which case the configuration and action owner
@@ -719,9 +709,7 @@ public final class LinkCommandLine extends CommandLine {
runtimeSolibDir,
nativeDeps,
useTestOnlyFlags,
- needWholeArchive,
paramFile,
- noWholeArchiveFlags,
variables,
featureConfiguration);
}
@@ -874,15 +862,5 @@ public final class LinkCommandLine extends CommandLine {
this.runtimeSolibDir = runtimeSolibDir;
return this;
}
-
- /**
- * Set flags that should not be in a --whole_archive block.
- *
- * <p>TODO(b/30228443): Refactor into action_configs.
- */
- public Builder setNoWholeArchiveFlags(List<String> noWholeArchiveFlags) {
- this.noWholeArchiveFlags = noWholeArchiveFlags;
- return this;
- }
}
}