aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
diff options
context:
space:
mode:
authorGravatar hlopko <hlopko@google.com>2018-05-07 23:52:02 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-07 23:53:03 -0700
commit0c5cc1b0253b57c4d04e324fc36536c094a77a6f (patch)
tree27d38f58f416b1b59247d2c26d8e64c144299870 /src/main/java/com/google/devtools/build/lib/rules/cpp/LinkCommandLine.java
parenta590dd10f0a3cdb1c42a6e8d2735cde37b5594bc (diff)
Rename LinkStaticness to LinkingMode and unify with the other LinkingMode.
RELNOTES: None. PiperOrigin-RevId: 195777400
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.java27
1 files changed, 12 insertions, 15 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 9fca9f65ab..545dd9e956 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
@@ -25,7 +25,6 @@ import com.google.devtools.build.lib.collect.CollectionUtils;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
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.Link.LinkStaticness;
import com.google.devtools.build.lib.rules.cpp.Link.LinkTargetType;
import com.google.devtools.build.lib.rules.cpp.Link.LinkerOrArchiver;
import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
@@ -51,7 +50,7 @@ public final class LinkCommandLine extends CommandLine {
private final ImmutableList<Artifact> buildInfoHeaderArtifacts;
private final Iterable<Artifact> linkerInputArtifacts;
private final LinkTargetType linkTargetType;
- private final LinkStaticness linkStaticness;
+ private final Link.LinkingMode linkingMode;
private final ImmutableList<String> linkopts;
@Nullable private final PathFragment toolchainLibrariesSolibDir;
private final boolean nativeDeps;
@@ -66,7 +65,7 @@ public final class LinkCommandLine extends CommandLine {
ImmutableList<Artifact> buildInfoHeaderArtifacts,
Iterable<Artifact> linkerInputArtifacts,
LinkTargetType linkTargetType,
- LinkStaticness linkStaticness,
+ Link.LinkingMode linkingMode,
ImmutableList<String> linkopts,
@Nullable PathFragment toolchainLibrariesSolibDir,
boolean nativeDeps,
@@ -82,7 +81,7 @@ public final class LinkCommandLine extends CommandLine {
this.buildInfoHeaderArtifacts = Preconditions.checkNotNull(buildInfoHeaderArtifacts);
this.linkerInputArtifacts = Preconditions.checkNotNull(linkerInputArtifacts);
this.linkTargetType = Preconditions.checkNotNull(linkTargetType);
- this.linkStaticness = Preconditions.checkNotNull(linkStaticness);
+ this.linkingMode = Preconditions.checkNotNull(linkingMode);
this.linkopts = linkopts;
this.toolchainLibrariesSolibDir = toolchainLibrariesSolibDir;
this.nativeDeps = nativeDeps;
@@ -112,11 +111,9 @@ public final class LinkCommandLine extends CommandLine {
return linkTargetType;
}
- /**
- * Returns the "staticness" of the link.
- */
- public LinkStaticness getLinkStaticness() {
- return linkStaticness;
+ /** Returns the "staticness" of the link. */
+ public Link.LinkingMode getLinkingMode() {
+ return linkingMode;
}
/**
@@ -416,7 +413,7 @@ public final class LinkCommandLine extends CommandLine {
private ImmutableList<Artifact> buildInfoHeaderArtifacts = ImmutableList.of();
private Iterable<Artifact> linkerInputArtifacts = ImmutableList.of();
@Nullable private LinkTargetType linkTargetType;
- private LinkStaticness linkStaticness = LinkStaticness.FULLY_STATIC;
+ private Link.LinkingMode linkingMode = Link.LinkingMode.LEGACY_FULLY_STATIC;
private ImmutableList<String> linkopts = ImmutableList.of();
@Nullable private PathFragment toolchainLibrariesSolibDir;
private boolean nativeDeps;
@@ -454,7 +451,7 @@ public final class LinkCommandLine extends CommandLine {
buildInfoHeaderArtifacts,
linkerInputArtifacts,
linkTargetType,
- linkStaticness,
+ linkingMode,
linkopts,
toolchainLibrariesSolibDir,
nativeDeps,
@@ -512,11 +509,11 @@ public final class LinkCommandLine extends CommandLine {
/**
* Sets how static the link is supposed to be. For static target types (see {@link
* LinkTargetType#linkerOrArchiver()}}), the {@link #build} method throws an exception if this
- * is not {@link LinkStaticness#FULLY_STATIC}. The default setting is {@link
- * LinkStaticness#FULLY_STATIC}.
+ * is not {@link Link.LinkingMode#LEGACY_FULLY_STATIC}. The default setting is {@link
+ * Link.LinkingMode#LEGACY_FULLY_STATIC}.
*/
- public Builder setLinkStaticness(LinkStaticness linkStaticness) {
- this.linkStaticness = linkStaticness;
+ public Builder setLinkingMode(Link.LinkingMode linkingMode) {
+ this.linkingMode = linkingMode;
return this;
}