Rename CcRunfiles fields one more time to be perfectly accurate.
RELNOTES: None.
@@ -23,44 +23,40 @@ 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 =
+ 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.getDynamicLibrariesForLinkingStatically();
+ return ccRunfiles == null ? Runfiles.EMPTY : ccRunfiles.getRunfilesForLinkingStatically();
};
/**
@@ -68,13 +64,13 @@ public final class CcRunfiles {
* 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;
}
}
