aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar hlopko <hlopko@google.com>2018-05-23 05:03:43 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-23 05:04:57 -0700
commitc1bada0b14b5bb8def73b23d29c9139a72224a14 (patch)
tree6564443015d8901612561f9b7715c19bc945017b
parent3493e4c7f98984b9b0109d2234b67637057d2843 (diff)
Rename CcRunfiles fields one more time to be perfectly accurate.
RELNOTES: None. PiperOrigin-RevId: 197707463
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcRunfiles.java48
1 files changed, 21 insertions, 27 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcRunfiles.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcRunfiles.java
index 7774f69779..bd6dd6b3cd 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcRunfiles.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcRunfiles.java
@@ -23,58 +23,54 @@ import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
/**
* Runfiles provider for C++ targets.
*
- * <p>Contains two {@link Runfiles} objects: one for the eventual statically linked binary and one
- * for the one that uses shared libraries. Data dependencies are present in both.
+ * <p>Contains two {@link Runfiles} objects: one for the statically linked binary and one for the
+ * dynamically linked binary. Both contain dynamic libraries needed at runtime and data
+ * dependencies.
*/
@Immutable
@AutoCodec
public final class CcRunfiles {
- private final Runfiles dynamicLibrariesForLinkingStatically;
- private final Runfiles dynamicLibrariesForLinkingDynamically;
+ private final Runfiles runfilesForLinkingStatically;
+ private final Runfiles runfilesForLinkingDynamically;
@AutoCodec.Instantiator
- public CcRunfiles(
- Runfiles dynamicLibrariesForLinkingStatically,
- Runfiles dynamicLibrariesForLinkingDynamically) {
- this.dynamicLibrariesForLinkingStatically = dynamicLibrariesForLinkingStatically;
- this.dynamicLibrariesForLinkingDynamically = dynamicLibrariesForLinkingDynamically;
+ public CcRunfiles(Runfiles runfilesForLinkingStatically, Runfiles runfilesForLinkingDynamically) {
+ this.runfilesForLinkingStatically = runfilesForLinkingStatically;
+ this.runfilesForLinkingDynamically = runfilesForLinkingDynamically;
}
- public Runfiles getDynamicLibrariesForLinkingStatically() {
- return dynamicLibrariesForLinkingStatically;
+ public Runfiles getRunfilesForLinkingStatically() {
+ return runfilesForLinkingStatically;
}
- public Runfiles getDynamicLibrariesForLinkingDynamically() {
- return dynamicLibrariesForLinkingDynamically;
+ public Runfiles getRunfilesForLinkingDynamically() {
+ return runfilesForLinkingDynamically;
}
/**
* Returns a function that gets the static C++ runfiles from a {@link TransitiveInfoCollection} or
* the empty runfiles instance if it does not contain that provider.
*/
- public static final Function<TransitiveInfoCollection, Runfiles>
- DYNAMIC_LIBRARIES_FOR_LINKING_STATICALLY =
- input -> {
- CcLinkingInfo provider = input.get(CcLinkingInfo.PROVIDER);
- CcRunfiles ccRunfiles = provider == null ? null : provider.getCcRunfiles();
- return ccRunfiles == null
- ? Runfiles.EMPTY
- : ccRunfiles.getDynamicLibrariesForLinkingStatically();
- };
+ public static final Function<TransitiveInfoCollection, Runfiles> RUNFILES_FOR_LINKING_STATICALLY =
+ input -> {
+ CcLinkingInfo provider = input.get(CcLinkingInfo.PROVIDER);
+ CcRunfiles ccRunfiles = provider == null ? null : provider.getCcRunfiles();
+ return ccRunfiles == null ? Runfiles.EMPTY : ccRunfiles.getRunfilesForLinkingStatically();
+ };
/**
* Returns a function that gets the shared C++ runfiles from a {@link TransitiveInfoCollection} or
* the empty runfiles instance if it does not contain that provider.
*/
public static final Function<TransitiveInfoCollection, Runfiles>
- DYNAMIC_LIBRARIES_FOR_LINKING_DYNAMICALLY =
+ RUNFILES_FOR_LINKING_DYNAMICALLY =
input -> {
CcLinkingInfo provider = input.get(CcLinkingInfo.PROVIDER);
CcRunfiles ccRunfiles = provider == null ? null : provider.getCcRunfiles();
return ccRunfiles == null
? Runfiles.EMPTY
- : ccRunfiles.getDynamicLibrariesForLinkingDynamically();
+ : ccRunfiles.getRunfilesForLinkingDynamically();
};
/**
@@ -83,8 +79,6 @@ public final class CcRunfiles {
*/
public static final Function<TransitiveInfoCollection, Runfiles> runfilesFunction(
boolean linkingStatically) {
- return linkingStatically
- ? DYNAMIC_LIBRARIES_FOR_LINKING_STATICALLY
- : DYNAMIC_LIBRARIES_FOR_LINKING_DYNAMICALLY;
+ return linkingStatically ? RUNFILES_FOR_LINKING_STATICALLY : RUNFILES_FOR_LINKING_DYNAMICALLY;
}
}