aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java16
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationOutputs.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java22
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java106
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java30
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/DwoArtifactsCollector.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendAction.java (renamed from src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendAction.java)12
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java (renamed from src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java)14
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java14
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/cpp/LtoBackendActionTest.java (renamed from src/test/java/com/google/devtools/build/lib/rules/cpp/LTOBackendActionTest.java)14
17 files changed, 132 insertions, 132 deletions
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 0afccb6eb5..12e660fe47 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
@@ -283,19 +283,19 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory {
// Store immutable context for use in other *_binary rules that are implemented by
// linking the interpreter (Java, Python, etc.) together with native deps.
CppLinkAction.Context linkContext = new CppLinkAction.Context(linkActionBuilder);
- Iterable<LTOBackendArtifacts> ltoBackendArtifacts = ImmutableList.of();
+ Iterable<LtoBackendArtifacts> ltoBackendArtifacts = ImmutableList.of();
boolean usePic = CppHelper.usePic(ruleContext, !isLinkShared(ruleContext));
if (featureConfiguration.isEnabled(CppRuleClasses.THIN_LTO)) {
- linkActionBuilder.setLTOIndexing(true);
- linkActionBuilder.setUsePicForLTOBackendActions(usePic);
- linkActionBuilder.setUseFissionForLTOBackendActions(cppConfiguration.useFission());
+ linkActionBuilder.setLtoIndexing(true);
+ linkActionBuilder.setUsePicForLtoBackendActions(usePic);
+ linkActionBuilder.setUseFissionForLtoBackendActions(cppConfiguration.useFission());
CppLinkAction indexAction = linkActionBuilder.build();
ruleContext.registerAction(indexAction);
- ltoBackendArtifacts = indexAction.getAllLTOBackendArtifacts();
+ ltoBackendArtifacts = indexAction.getAllLtoBackendArtifacts();
- linkActionBuilder.setLTOIndexing(false);
+ linkActionBuilder.setLtoIndexing(false);
}
// On Windows, if GENERATE_PDB_FILE feature is enabled
@@ -485,7 +485,7 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory {
}
}
- builder.addLTOBitcodeFiles(info.getCcCompilationOutputs().getLtoBitcodeFiles());
+ builder.addLtoBitcodeFiles(info.getCcCompilationOutputs().getLtoBitcodeFiles());
builder.addNonCodeInputs(common.getLinkerScripts());
// Determine the libraries to link in.
@@ -556,7 +556,7 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory {
LinkStaticness linkStaticness,
boolean generateDwo,
boolean ltoBackendArtifactsUsePic,
- Iterable<LTOBackendArtifacts> ltoBackendArtifacts) {
+ Iterable<LtoBackendArtifacts> ltoBackendArtifacts) {
if (linkStaticness == LinkStaticness.DYNAMIC) {
return DwoArtifactsCollector.directCollector(
context, compilationOutputs, generateDwo, ltoBackendArtifactsUsePic, ltoBackendArtifacts);
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 a45fdb1bf1..ae81e984a3 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
@@ -186,7 +186,7 @@ public final class CcCommon {
CcCompilationOutputs compilationOutputs,
boolean generateDwo,
boolean ltoBackendArtifactsUsePic,
- Iterable<LTOBackendArtifacts> ltoBackendArtifacts) {
+ Iterable<LtoBackendArtifacts> ltoBackendArtifacts) {
ImmutableList.Builder<TransitiveInfoCollection> deps =
ImmutableList.<TransitiveInfoCollection>builder();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationOutputs.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationOutputs.java
index 4b48783ccf..7b9c0e5831 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationOutputs.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationOutputs.java
@@ -223,12 +223,12 @@ public class CcCompilationOutputs {
return this;
}
- public Builder addLTOBitcodeFile(Artifact fullBitcode, Artifact ltoIndexingBitcode) {
+ public Builder addLtoBitcodeFile(Artifact fullBitcode, Artifact ltoIndexingBitcode) {
ltoBitcodeFiles.put(fullBitcode, ltoIndexingBitcode);
return this;
}
- public Builder addLTOBitcodeFile(ImmutableMap<Artifact, Artifact> artifacts) {
+ public Builder addLtoBitcodeFile(ImmutableMap<Artifact, Artifact> artifacts) {
ltoBitcodeFiles.putAll(artifacts);
return this;
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java
index 17e33e8de8..dfc3e7200c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java
@@ -957,7 +957,7 @@ public final class CcLibraryHelper {
ccOutputs =
new CcCompilationOutputs.Builder()
.merge(ccOutputs)
- .addLTOBitcodeFile(ccOutputs.getLtoBitcodeFiles())
+ .addLtoBitcodeFile(ccOutputs.getLtoBitcodeFiles())
.addObjectFiles(objectFiles)
.addPicObjectFiles(picObjectFiles)
.build();
@@ -1032,7 +1032,7 @@ public final class CcLibraryHelper {
deps, /*generateDwo=*/
false, /*ltoBackendArtifactsUsePic=*/
false, /*ltoBackendArtifacts=*/
- ImmutableList.<LTOBackendArtifacts>of());
+ ImmutableList.<LtoBackendArtifacts>of());
Runfiles cppStaticRunfiles = collectCppRunfiles(ccLinkingOutputs, true);
Runfiles cppSharedRunfiles = collectCppRunfiles(ccLinkingOutputs, false);
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java
index f2af6109b6..6020ae906b 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileActionBuilder.java
@@ -642,7 +642,7 @@ public class CppCompileActionBuilder {
* Set the minimized bitcode file emitted by this (ThinLTO) compilation that can be used in place
* of the full bitcode outputFile in the LTO indexing step.
*/
- public CppCompileActionBuilder setLTOIndexingFile(Artifact ltoIndexingFile) {
+ public CppCompileActionBuilder setLtoIndexingFile(Artifact ltoIndexingFile) {
this.ltoIndexingFile = ltoIndexingFile;
return this;
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
index 64134d8f19..11f05ac28f 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppConfiguration.java
@@ -1154,7 +1154,7 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
}
/** Returns the set of command-line LTO indexing options. */
- public ImmutableList<String> getLTOIndexOptions() {
+ public ImmutableList<String> getLtoIndexOptions() {
return ltoindexOptions;
}
@@ -1761,7 +1761,7 @@ public class CppConfiguration extends BuildConfiguration.Fragment {
if (cppOptions.getLipoMode() != LipoMode.OFF
&& isLLVMCompiler()
- && !cppOptions.convertLipoToThinLTO) {
+ && !cppOptions.convertLipoToThinLto) {
reporter.handle(
Event.error(
"The LLVM compiler does not support LIPO. Use --convert_lipo_to_thinlto to "
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
index ce96697bbc..d86fa47619 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
@@ -113,10 +113,10 @@ public final class CppLinkAction extends AbstractAction
/** True for cc_fake_binary targets. */
private final boolean fake;
- private final boolean isLTOIndexing;
+ private final boolean isLtoIndexing;
// This is set for both LTO indexing and LTO linking.
- @Nullable private final Iterable<LTOBackendArtifacts> allLTOBackendArtifacts;
+ @Nullable private final Iterable<LtoBackendArtifacts> allLtoBackendArtifacts;
private final Iterable<Artifact> mandatoryInputs;
// Linking uses a lot of memory; estimate 1 MB per input file, min 1.5 Gib.
@@ -153,8 +153,8 @@ public final class CppLinkAction extends AbstractAction
Artifact linkOutput,
LibraryToLink interfaceOutputLibrary,
boolean fake,
- boolean isLTOIndexing,
- Iterable<LTOBackendArtifacts> allLTOBackendArtifacts,
+ boolean isLtoIndexing,
+ Iterable<LtoBackendArtifacts> allLtoBackendArtifacts,
LinkCommandLine linkCommandLine,
ImmutableSet<String> clientEnvironmentVariables,
ImmutableMap<String, String> actionEnv,
@@ -162,7 +162,7 @@ public final class CppLinkAction extends AbstractAction
ImmutableSet<String> executionRequirements) {
super(owner, inputs, outputs);
if (mnemonic == null) {
- this.mnemonic = (isLTOIndexing) ? "CppLTOIndexing" : "CppLink";
+ this.mnemonic = (isLtoIndexing) ? "CppLTOIndexing" : "CppLink";
} else {
this.mnemonic = mnemonic;
}
@@ -172,8 +172,8 @@ public final class CppLinkAction extends AbstractAction
this.linkOutput = linkOutput;
this.interfaceOutputLibrary = interfaceOutputLibrary;
this.fake = fake;
- this.isLTOIndexing = isLTOIndexing;
- this.allLTOBackendArtifacts = allLTOBackendArtifacts;
+ this.isLtoIndexing = isLtoIndexing;
+ this.allLtoBackendArtifacts = allLtoBackendArtifacts;
this.linkCommandLine = linkCommandLine;
this.clientEnvironmentVariables = clientEnvironmentVariables;
this.actionEnv = actionEnv;
@@ -291,8 +291,8 @@ public final class CppLinkAction extends AbstractAction
return linkCommandLine.getCommandLine();
}
- Iterable<LTOBackendArtifacts> getAllLTOBackendArtifacts() {
- return allLTOBackendArtifacts;
+ Iterable<LtoBackendArtifacts> getAllLtoBackendArtifacts() {
+ return allLtoBackendArtifacts;
}
private boolean needsToRunOnMac() {
@@ -468,7 +468,7 @@ public final class CppLinkAction extends AbstractAction
if (linkCommandLine.getRuntimeSolibDir() != null) {
f.addPath(linkCommandLine.getRuntimeSolibDir());
}
- f.addBoolean(isLTOIndexing);
+ f.addBoolean(isLtoIndexing);
return f.hexDigestAndReset();
}
@@ -500,7 +500,7 @@ public final class CppLinkAction extends AbstractAction
@Override
protected String getRawProgressMessage() {
- return (isLTOIndexing ? "LTO indexing " : "Linking ") + linkOutput.prettyPrint();
+ return (isLtoIndexing ? "LTO indexing " : "Linking ") + linkOutput.prettyPrint();
}
/**
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 d452dec55b..c06f32b741 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
@@ -197,10 +197,10 @@ public class CppLinkActionBuilder {
private boolean wholeArchive;
private LinkArtifactFactory linkArtifactFactory = CppLinkAction.DEFAULT_ARTIFACT_FACTORY;
- private boolean isLTOIndexing = false;
- private boolean usePicForLTOBackendActions = false;
- private boolean useFissionForLTOBackendActions = false;
- private Iterable<LTOBackendArtifacts> allLTOArtifacts = null;
+ private boolean isLtoIndexing = false;
+ private boolean usePicForLtoBackendActions = false;
+ private boolean useFissionForLtoBackendActions = false;
+ private Iterable<LtoBackendArtifacts> allLtoArtifacts = null;
private final List<VariablesExtension> variablesExtensions = new ArrayList<>();
private final NestedSetBuilder<Artifact> linkActionInputs = NestedSetBuilder.stableOrder();
@@ -460,7 +460,7 @@ public class CppLinkActionBuilder {
* Maps bitcode object files used by the LTO backends to the corresponding minimized bitcode file
* used as input to the LTO indexing step.
*/
- private ImmutableSet<LinkerInput> computeLTOIndexingObjectFileInputs() {
+ private ImmutableSet<LinkerInput> computeLtoIndexingObjectFileInputs() {
ImmutableSet.Builder<LinkerInput> objectFileInputsBuilder = ImmutableSet.<LinkerInput>builder();
for (LinkerInput input : objectFiles) {
Artifact objectFile = input.getArtifact();
@@ -476,7 +476,7 @@ public class CppLinkActionBuilder {
* Maps bitcode library files used by the LTO backends to the corresponding minimized bitcode file
* used as input to the LTO indexing step.
*/
- private static NestedSet<LibraryToLink> computeLTOIndexingUniqueLibraries(
+ private static NestedSet<LibraryToLink> computeLtoIndexingUniqueLibraries(
NestedSet<LibraryToLink> originalUniqueLibraries) {
NestedSetBuilder<LibraryToLink> uniqueLibrariesBuilder = NestedSetBuilder.linkOrder();
for (LibraryToLink lib : originalUniqueLibraries) {
@@ -486,7 +486,7 @@ public class CppLinkActionBuilder {
}
ImmutableSet.Builder<Artifact> newObjectFilesBuilder = ImmutableSet.<Artifact>builder();
for (Artifact a : lib.getObjectFiles()) {
- newObjectFilesBuilder.add(lib.getLTOBitcodeFiles().getOrDefault(a, a));
+ newObjectFilesBuilder.add(lib.getLtoBitcodeFiles().getOrDefault(a, a));
}
uniqueLibrariesBuilder.add(
LinkerInputs.newInputLibrary(
@@ -494,16 +494,16 @@ public class CppLinkActionBuilder {
lib.getArtifactCategory(),
lib.getLibraryIdentifier(),
newObjectFilesBuilder.build(),
- lib.getLTOBitcodeFiles()));
+ lib.getLtoBitcodeFiles()));
}
return uniqueLibrariesBuilder.build();
}
- private Iterable<LTOBackendArtifacts> createLTOArtifacts(
+ private Iterable<LtoBackendArtifacts> createLtoArtifacts(
PathFragment ltoOutputRootPrefix, NestedSet<LibraryToLink> uniqueLibraries) {
Set<Artifact> compiled = new LinkedHashSet<>();
for (LibraryToLink lib : uniqueLibraries) {
- compiled.addAll(lib.getLTOBitcodeFiles().keySet());
+ compiled.addAll(lib.getLtoBitcodeFiles().keySet());
}
// This flattens the set of object files, so for M binaries and N .o files,
@@ -525,10 +525,10 @@ public class CppLinkActionBuilder {
}
}
- ImmutableList.Builder<LTOBackendArtifacts> ltoOutputs = ImmutableList.builder();
+ ImmutableList.Builder<LtoBackendArtifacts> ltoOutputs = ImmutableList.builder();
for (Artifact a : allBitcode.values()) {
- LTOBackendArtifacts ltoArtifacts =
- new LTOBackendArtifacts(
+ LtoBackendArtifacts ltoArtifacts =
+ new LtoBackendArtifacts(
ltoOutputRootPrefix, a, allBitcode, ruleContext, configuration, linkArtifactFactory);
ltoOutputs.add(ltoArtifacts);
}
@@ -597,9 +597,9 @@ public class CppLinkActionBuilder {
// a native link.
NestedSet<LibraryToLink> uniqueLibraries;
ImmutableSet<LinkerInput> objectFileInputs;
- if (isLTOIndexing) {
- objectFileInputs = computeLTOIndexingObjectFileInputs();
- uniqueLibraries = computeLTOIndexingUniqueLibraries(originalUniqueLibraries);
+ if (isLtoIndexing) {
+ objectFileInputs = computeLtoIndexingObjectFileInputs();
+ uniqueLibraries = computeLtoIndexingUniqueLibraries(originalUniqueLibraries);
} else {
objectFileInputs = ImmutableSet.copyOf(objectFiles);
uniqueLibraries = originalUniqueLibraries;
@@ -637,19 +637,19 @@ public class CppLinkActionBuilder {
mapLinkstampsToOutputs(linkstamps, ruleContext, configuration, output, linkArtifactFactory);
PathFragment ltoOutputRootPrefix = null;
- if (isLTOIndexing && allLTOArtifacts == null) {
+ if (isLtoIndexing && allLtoArtifacts == null) {
ltoOutputRootPrefix =
FileSystemUtils.appendExtension(
output.getRootRelativePath(), ".lto");
// Use the originalUniqueLibraries which contains the full bitcode files
// needed by the LTO backends (as opposed to the minimized bitcode files
// that can be used by the LTO indexing step).
- allLTOArtifacts = createLTOArtifacts(ltoOutputRootPrefix, originalUniqueLibraries);
+ allLtoArtifacts = createLtoArtifacts(ltoOutputRootPrefix, originalUniqueLibraries);
}
PathFragment linkerParamFileRootPath = null;
@Nullable Artifact thinltoParamFile = null;
- if (allLTOArtifacts != null) {
+ if (allLtoArtifacts != null) {
// Create artifact for the file that the LTO indexing step will emit
// object file names into for any that were included in the link as
// determined by the linker's symbol resolution. It will be used to
@@ -664,9 +664,9 @@ public class CppLinkActionBuilder {
}
final ImmutableList<Artifact> actionOutputs;
- if (isLTOIndexing) {
+ if (isLtoIndexing) {
ImmutableList.Builder<Artifact> builder = ImmutableList.builder();
- for (LTOBackendArtifacts ltoA : allLTOArtifacts) {
+ for (LtoBackendArtifacts ltoA : allLtoArtifacts) {
ltoA.addIndexingOutputs(builder);
}
if (thinltoParamFile != null) {
@@ -686,7 +686,7 @@ public class CppLinkActionBuilder {
ImmutableList.copyOf(LinkerInputs.simpleLinkerInputs(runtimeInputs, runtimeType));
PathFragment paramRootPath =
- ParameterFile.derivePath(output.getRootRelativePath(), (isLTOIndexing) ? "lto-index" : "2");
+ ParameterFile.derivePath(output.getRootRelativePath(), (isLtoIndexing) ? "lto-index" : "2");
@Nullable
final Artifact paramFile =
@@ -697,7 +697,7 @@ public class CppLinkActionBuilder {
// Add build variables necessary to template link args into the crosstool.
Variables.Builder buildVariablesBuilder = new Variables.Builder();
CppLinkVariablesExtension variablesExtension =
- isLTOIndexing
+ isLtoIndexing
? new CppLinkVariablesExtension(
configuration,
ImmutableMap.<Artifact, Artifact>of(),
@@ -772,7 +772,7 @@ public class CppLinkActionBuilder {
toolchain.getLinkDynamicLibraryTool().getExecPathString());
}
- if (!isLTOIndexing) {
+ if (!isLtoIndexing) {
linkCommandLineBuilder
.setOutput(output)
.setBuildInfoHeaderArtifacts(buildInfoHeaderArtifacts)
@@ -782,7 +782,7 @@ public class CppLinkActionBuilder {
} else {
List<String> opts = new ArrayList<>(linkopts);
opts.addAll(featureConfiguration.getCommandLine("lto-indexing", buildVariables));
- opts.addAll(cppConfiguration.getLTOIndexOptions());
+ opts.addAll(cppConfiguration.getLtoIndexOptions());
linkCommandLineBuilder.setLinkopts(ImmutableList.copyOf(opts));
}
@@ -799,7 +799,7 @@ public class CppLinkActionBuilder {
if (runtimeMiddleman != null) {
dependencyInputsBuilder.add(runtimeMiddleman);
}
- if (!isLTOIndexing) {
+ if (!isLtoIndexing) {
dependencyInputsBuilder.addAll(buildInfoHeaderArtifacts);
dependencyInputsBuilder.addAll(linkstamps);
dependencyInputsBuilder.addTransitive(compilationInputs.build());
@@ -811,11 +811,11 @@ public class CppLinkActionBuilder {
uniqueLibraries, needWholeArchive, cppConfiguration.archiveType()));
Iterable<Artifact> expandedNonLibraryInputs = LinkerInputs.toLibraryArtifacts(objectFileInputs);
- if (!isLTOIndexing && allLTOArtifacts != null) {
+ if (!isLtoIndexing && allLtoArtifacts != null) {
// We are doing LTO, and this is the real link, so substitute
// the LTO bitcode files with the real object files they were translated into.
Map<Artifact, Artifact> ltoMapping = new HashMap<>();
- for (LTOBackendArtifacts a : allLTOArtifacts) {
+ for (LtoBackendArtifacts a : allLtoArtifacts) {
ltoMapping.put(a.getBitcodeFile(), a.getObjectFile());
}
@@ -834,20 +834,20 @@ public class CppLinkActionBuilder {
renamedNonLibraryInputs.add(renamed == null ? a : renamed);
}
expandedNonLibraryInputs = renamedNonLibraryInputs;
- } else if (isLTOIndexing && allLTOArtifacts != null) {
- for (LTOBackendArtifacts a : allLTOArtifacts) {
+ } else if (isLtoIndexing && allLtoArtifacts != null) {
+ for (LtoBackendArtifacts a : allLtoArtifacts) {
List<String> argv = new ArrayList<>();
argv.addAll(toolchain.getLinkOptions());
argv.addAll(cppConfiguration.getCompilerOptions(features));
a.setCommandLine(argv);
- a.scheduleLTOBackendAction(
+ a.scheduleLtoBackendAction(
ruleContext,
featureConfiguration,
toolchain,
fdoSupport,
- usePicForLTOBackendActions,
- useFissionForLTOBackendActions);
+ usePicForLtoBackendActions,
+ useFissionForLtoBackendActions);
}
}
@@ -860,7 +860,7 @@ public class CppLinkActionBuilder {
.add(dependencyInputsBuilder.build())
.add(ImmutableIterable.from(expandedInputs));
- if (thinltoParamFile != null && !isLTOIndexing) {
+ if (thinltoParamFile != null && !isLtoIndexing) {
inputsBuilder.add(ImmutableList.of(thinltoParamFile));
}
if (linkCommandLine.getParamFile() != null) {
@@ -897,8 +897,8 @@ public class CppLinkActionBuilder {
output,
interfaceOutputLibrary,
fake,
- isLTOIndexing,
- allLTOArtifacts,
+ isLtoIndexing,
+ allLtoArtifacts,
linkCommandLine,
configuration.getVariableShellEnvironment(),
configuration.getLocalShellEnvironment(),
@@ -997,23 +997,23 @@ public class CppLinkActionBuilder {
/**
* This is the LTO indexing step, rather than the real link.
*
- * <p>When using this, build() will store allLTOArtifacts as a side-effect so the next build()
+ * <p>When using this, build() will store allLtoArtifacts as a side-effect so the next build()
* call can emit the real link. Do not call addInput() between the two build() calls.
*/
- public CppLinkActionBuilder setLTOIndexing(boolean ltoIndexing) {
- this.isLTOIndexing = ltoIndexing;
+ public CppLinkActionBuilder setLtoIndexing(boolean ltoIndexing) {
+ this.isLtoIndexing = ltoIndexing;
return this;
}
/** Sets flag for using PIC in any scheduled LTO Backend actions. */
- public CppLinkActionBuilder setUsePicForLTOBackendActions(boolean usePic) {
- this.usePicForLTOBackendActions = usePic;
+ public CppLinkActionBuilder setUsePicForLtoBackendActions(boolean usePic) {
+ this.usePicForLtoBackendActions = usePic;
return this;
}
/** Sets flag for using Fission in any scheduled LTO Backend actions. */
- public CppLinkActionBuilder setUseFissionForLTOBackendActions(boolean useFission) {
- this.useFissionForLTOBackendActions = useFission;
+ public CppLinkActionBuilder setUseFissionForLtoBackendActions(boolean useFission) {
+ this.useFissionForLtoBackendActions = useFission;
return this;
}
@@ -1078,7 +1078,7 @@ public class CppLinkActionBuilder {
this.objectFiles.add(input);
}
- public CppLinkActionBuilder addLTOBitcodeFiles(ImmutableMap<Artifact, Artifact> files) {
+ public CppLinkActionBuilder addLtoBitcodeFiles(ImmutableMap<Artifact, Artifact> files) {
Preconditions.checkState(ltoBitcodeFiles == null);
ltoBitcodeFiles = files;
return this;
@@ -1471,7 +1471,7 @@ public class CppLinkActionBuilder {
OUTPUT_EXECPATH_VARIABLE, outputArtifact.getExecPathString());
}
- if (isLTOIndexing()) {
+ if (isLtoIndexing()) {
if (thinltoParamFile != null) {
// This is a lto-indexing action and we want it to populate param file.
buildVariables.addStringVariable(
@@ -1524,7 +1524,7 @@ public class CppLinkActionBuilder {
fdoSupport.getFdoSupport().getLinkOptions(featureConfiguration, buildVariables);
}
- private boolean isLTOIndexing() {
+ private boolean isLtoIndexing() {
return !ltoOutputRootPrefix.equals(PathFragment.EMPTY_FRAGMENT);
}
@@ -1650,7 +1650,7 @@ public class CppLinkActionBuilder {
}
private Map<Artifact, Artifact> generateLtoMap() {
- if (isLTOIndexing || allLTOArtifacts == null) {
+ if (isLtoIndexing || allLtoArtifacts == null) {
return null;
}
// TODO(bazel-team): The LTO final link can only work if there are individual .o files on
@@ -1663,7 +1663,7 @@ public class CppLinkActionBuilder {
Preconditions.checkState(cppConfiguration.useStartEndLib());
Map<Artifact, Artifact> ltoMap = new HashMap<>();
- for (LTOBackendArtifacts l : allLTOArtifacts) {
+ for (LtoBackendArtifacts l : allLtoArtifacts) {
ltoMap.put(l.getBitcodeFile(), l.getObjectFile());
}
return ltoMap;
@@ -1814,7 +1814,7 @@ public class CppLinkActionBuilder {
if (Link.useStartEndLib(input, cppConfiguration.archiveType())) {
Iterable<Artifact> archiveMembers = input.getObjectFiles();
if (!Iterables.isEmpty(archiveMembers)) {
- ImmutableList.Builder<String> nonLTOArchiveMembersBuilder = ImmutableList.builder();
+ ImmutableList.Builder<String> nonLtoArchiveMembersBuilder = ImmutableList.builder();
for (Artifact member : archiveMembers) {
if (ltoMap != null && ltoMap.remove(member) != null) {
// The LTO artifacts that should be included in the final link
@@ -1823,13 +1823,13 @@ public class CppLinkActionBuilder {
// files explicitly, or generate .o files from assembler.
continue;
}
- nonLTOArchiveMembersBuilder.add(member.getExecPathString());
+ nonLtoArchiveMembersBuilder.add(member.getExecPathString());
}
- ImmutableList<String> nonLTOArchiveMembers = nonLTOArchiveMembersBuilder.build();
- if (!nonLTOArchiveMembers.isEmpty()) {
+ ImmutableList<String> nonLtoArchiveMembers = nonLtoArchiveMembersBuilder.build();
+ if (!nonLtoArchiveMembers.isEmpty()) {
boolean inputIsWholeArchive = !isRuntimeLinkerInput && needWholeArchive;
librariesToLink.addValue(
- LibraryToLinkValue.forObjectFileGroup(nonLTOArchiveMembers, inputIsWholeArchive));
+ LibraryToLinkValue.forObjectFileGroup(nonLtoArchiveMembers, inputIsWholeArchive));
}
}
} else {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
index 2d3a3a1254..1ca69d798e 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
@@ -196,7 +196,7 @@ public final class CppModel {
return ruleContext.getRelatedArtifact(outputFile.getRootRelativePath(), ".dwo");
}
- private Artifact getLTOIndexingFile(Artifact outputFile) {
+ private Artifact getLtoIndexingFile(Artifact outputFile) {
String ext = Iterables.getOnlyElement(CppFileTypes.LTO_INDEXING_OBJECT_FILE.getExtensions());
return ruleContext.getRelatedArtifact(outputFile.getRootRelativePath(), ext);
}
@@ -640,7 +640,7 @@ public final class CppModel {
isCodeCoverageEnabled(),
// The source action does not generate dwo when it has bitcode
// output (since it isn't generating a native object with debug
- // info). In that case the LTOBackendAction will generate the dwo.
+ // info). In that case the LtoBackendAction will generate the dwo.
/*generateDwo=*/ cppConfiguration.useFission() && !bitcodeOutput,
isGenerateDotdFile(sourceArtifact),
source.getBuildVariables());
@@ -880,7 +880,7 @@ public final class CppModel {
: null;
Artifact dwoFile = generateDwo ? getDwoFile(picBuilder.getOutputFile()) : null;
Artifact ltoIndexingFile =
- bitcodeOutput ? getLTOIndexingFile(picBuilder.getOutputFile()) : null;
+ bitcodeOutput ? getLtoIndexingFile(picBuilder.getOutputFile()) : null;
setupCompileBuildVariables(
picBuilder,
@@ -901,7 +901,7 @@ public final class CppModel {
picBuilder.setGcnoFile(gcnoFile);
picBuilder.setDwoFile(dwoFile);
- picBuilder.setLTOIndexingFile(ltoIndexingFile);
+ picBuilder.setLtoIndexingFile(ltoIndexingFile);
semantics.finalizeCompileActionBuilder(
ruleContext, picBuilder, featureConfiguration.getFeatureSpecification());
@@ -912,7 +912,7 @@ public final class CppModel {
result.addPicObjectFile(picAction.getOutputFile());
if (bitcodeOutput) {
- result.addLTOBitcodeFile(picAction.getOutputFile(), ltoIndexingFile);
+ result.addLtoBitcodeFile(picAction.getOutputFile(), ltoIndexingFile);
}
}
if (dwoFile != null) {
@@ -942,7 +942,7 @@ public final class CppModel {
Artifact noPicDwoFile = generateDwo ? getDwoFile(noPicOutputFile) : null;
Artifact ltoIndexingFile =
- bitcodeOutput ? getLTOIndexingFile(builder.getOutputFile()) : null;
+ bitcodeOutput ? getLtoIndexingFile(builder.getOutputFile()) : null;
setupCompileBuildVariables(
builder,
@@ -968,7 +968,7 @@ public final class CppModel {
builder.setGcnoFile(gcnoFile);
builder.setDwoFile(noPicDwoFile);
- builder.setLTOIndexingFile(ltoIndexingFile);
+ builder.setLtoIndexingFile(ltoIndexingFile);
semantics.finalizeCompileActionBuilder(
ruleContext, builder, featureConfiguration.getFeatureSpecification());
@@ -979,7 +979,7 @@ public final class CppModel {
if (addObject) {
result.addObjectFile(objectFile);
if (bitcodeOutput) {
- result.addLTOBitcodeFile(objectFile, ltoIndexingFile);
+ result.addLtoBitcodeFile(objectFile, ltoIndexingFile);
}
}
if (noPicDwoFile != null) {
@@ -1187,7 +1187,7 @@ public final class CppModel {
newLinkActionBuilder(linkedArtifact)
.addObjectFiles(ccOutputs.getObjectFiles(usePicForBinaries))
.addNonCodeInputs(nonCodeLinkerInputs)
- .addLTOBitcodeFiles(ccOutputs.getLtoBitcodeFiles())
+ .addLtoBitcodeFiles(ccOutputs.getLtoBitcodeFiles())
.setLinkType(linkType)
.setLinkStaticness(LinkStaticness.FULLY_STATIC)
.addActionInputs(linkActionInputs)
@@ -1213,7 +1213,7 @@ public final class CppModel {
CppLinkAction picAction =
newLinkActionBuilder(picArtifact)
.addObjectFiles(ccOutputs.getObjectFiles(true))
- .addLTOBitcodeFiles(ccOutputs.getLtoBitcodeFiles())
+ .addLtoBitcodeFiles(ccOutputs.getLtoBitcodeFiles())
.setLinkType(picLinkType)
.setLinkStaticness(LinkStaticness.FULLY_STATIC)
.addActionInputs(linkActionInputs)
@@ -1269,7 +1269,7 @@ public final class CppModel {
.setInterfaceOutput(soInterface)
.addObjectFiles(ccOutputs.getObjectFiles(usePicForSharedLibs))
.addNonCodeInputs(ccOutputs.getHeaderTokenFiles())
- .addLTOBitcodeFiles(ccOutputs.getLtoBitcodeFiles())
+ .addLtoBitcodeFiles(ccOutputs.getLtoBitcodeFiles())
.setLinkType(LinkTargetType.DYNAMIC_LIBRARY)
.setLinkStaticness(LinkStaticness.DYNAMIC)
.addActionInputs(linkActionInputs)
@@ -1284,18 +1284,18 @@ public final class CppModel {
if (!ccOutputs.getLtoBitcodeFiles().isEmpty()
&& featureConfiguration.isEnabled(CppRuleClasses.THIN_LTO)) {
- linkActionBuilder.setLTOIndexing(true);
- linkActionBuilder.setUsePicForLTOBackendActions(usePicForSharedLibs);
+ linkActionBuilder.setLtoIndexing(true);
+ linkActionBuilder.setUsePicForLtoBackendActions(usePicForSharedLibs);
// If support is ever added for generating a dwp file for shared
// library targets (e.g. when linkstatic=0), then this should change
// to generate dwo files when cppConfiguration.useFission(),
// and the dwp generating action for the shared library should
// include all of the resulting dwo files.
- linkActionBuilder.setUseFissionForLTOBackendActions(false);
+ linkActionBuilder.setUseFissionForLtoBackendActions(false);
CppLinkAction indexAction = linkActionBuilder.build();
env.registerAction(indexAction);
- linkActionBuilder.setLTOIndexing(false);
+ linkActionBuilder.setLtoIndexing(false);
}
CppLinkAction action = linkActionBuilder.build();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
index 4a6a8579be..fec5f442d9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java
@@ -493,7 +493,7 @@ public class CppOptions extends FragmentOptions {
"If set, builds using LIPO will automatically be converted to ThinLTO for the LLVM "
+ "compiler."
)
- public boolean convertLipoToThinLTO;
+ public boolean convertLipoToThinLto;
@Option(
name = "lipo",
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java
index 6d40dbc95a..02962773fa 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CrosstoolConfigurationLoader.java
@@ -330,7 +330,7 @@ public class CrosstoolConfigurationLoader {
String desiredCpu = cpuTransformer.apply(config.getCpu());
CppOptions cppOptions = options.get(CppOptions.class);
boolean needsLipo =
- cppOptions.getLipoMode() != LipoMode.OFF && !cppOptions.convertLipoToThinLTO;
+ cppOptions.getLipoMode() != LipoMode.OFF && !cppOptions.convertLipoToThinLto;
for (CrosstoolConfig.DefaultCpuToolchain selector : release.getDefaultToolchainList()) {
if (needsLipo && !selector.getSupportsLipo()) {
continue;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/DwoArtifactsCollector.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/DwoArtifactsCollector.java
index 5745d35d0c..550ee409f3 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/DwoArtifactsCollector.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/DwoArtifactsCollector.java
@@ -46,7 +46,7 @@ public class DwoArtifactsCollector {
Iterable<TransitiveInfoCollection> deps,
boolean generateDwo,
boolean ltoBackendArtifactsUsePic,
- Iterable<LTOBackendArtifacts> ltoBackendArtifacts) {
+ Iterable<LtoBackendArtifacts> ltoBackendArtifacts) {
Preconditions.checkNotNull(compilationOutputs);
Preconditions.checkNotNull(deps);
@@ -60,9 +60,9 @@ public class DwoArtifactsCollector {
dwoBuilder.addAll(compilationOutputs.getDwoFiles());
picDwoBuilder.addAll(compilationOutputs.getPicDwoFiles());
- // If we are generating .dwo, add any generated for LTOBackendArtifacts.
+ // If we are generating .dwo, add any generated for LtoBackendArtifacts.
if (generateDwo) {
- for (LTOBackendArtifacts ltoBackendArtifact : ltoBackendArtifacts) {
+ for (LtoBackendArtifacts ltoBackendArtifact : ltoBackendArtifacts) {
Artifact objectFile = ltoBackendArtifact.getObjectFile();
if (ltoBackendArtifactsUsePic) {
picDwoBuilder.add(
@@ -105,7 +105,7 @@ public class DwoArtifactsCollector {
Iterable<TransitiveInfoCollection> deps,
boolean generateDwo,
boolean ltoBackendArtifactsUsePic,
- Iterable<LTOBackendArtifacts> ltoBackendArtifacts) {
+ Iterable<LtoBackendArtifacts> ltoBackendArtifacts) {
return new DwoArtifactsCollector(
ruleContext,
compilationOutputs,
@@ -125,7 +125,7 @@ public class DwoArtifactsCollector {
CcCompilationOutputs compilationOutputs,
boolean generateDwo,
boolean ltoBackendArtifactsUsePic,
- Iterable<LTOBackendArtifacts> ltoBackendArtifacts) {
+ Iterable<LtoBackendArtifacts> ltoBackendArtifacts) {
return new DwoArtifactsCollector(
ruleContext,
compilationOutputs,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
index bee6f9266c..d3deb1dd1c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
@@ -136,7 +136,7 @@ public abstract class LinkerInputs {
* has a library identifier.
*/
public interface LibraryToLink extends LinkerInput {
- ImmutableMap<Artifact, Artifact> getLTOBitcodeFiles();
+ ImmutableMap<Artifact, Artifact> getLtoBitcodeFiles();
/**
* Return the identifier for the library. This is used for de-duplication of linker inputs: two
@@ -192,7 +192,7 @@ public abstract class LinkerInputs {
}
@Override
- public ImmutableMap<Artifact, Artifact> getLTOBitcodeFiles() {
+ public ImmutableMap<Artifact, Artifact> getLtoBitcodeFiles() {
return ImmutableMap.of();
}
@@ -319,7 +319,7 @@ public abstract class LinkerInputs {
}
@Override
- public ImmutableMap<Artifact, Artifact> getLTOBitcodeFiles() {
+ public ImmutableMap<Artifact, Artifact> getLtoBitcodeFiles() {
return ltoBitcodeFiles;
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendAction.java
index 945c7bc2bd..8b02e5ea3d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendAction.java
@@ -39,11 +39,11 @@ import java.util.Set;
import javax.annotation.Nullable;
/**
- * Action used by LTOBackendArtifacts to create an LTOBackendAction. Similar to {@link SpawnAction},
+ * Action used by LtoBackendArtifacts to create an LtoBackendAction. Similar to {@link SpawnAction},
* except that inputs are discovered from the imports file created by the ThinLTO indexing step for
* each backend artifact.
*
- * <p>See {@link LTOBackendArtifacts} for a high level description of the ThinLTO build process. The
+ * <p>See {@link LtoBackendArtifacts} for a high level description of the ThinLTO build process. The
* LTO indexing step takes all bitcode .o files and decides which other .o file symbols can be
* imported/inlined. The additional input files for each backend action are then written to an
* imports file. Therefore these new inputs must be discovered here by subsetting the imports paths
@@ -52,14 +52,14 @@ import javax.annotation.Nullable;
* <p>For more information on ThinLTO see
* http://blog.llvm.org/2016/06/thinlto-scalable-and-incremental-lto.html.
*/
-public final class LTOBackendAction extends SpawnAction {
+public final class LtoBackendAction extends SpawnAction {
private Collection<Artifact> mandatoryInputs;
private Map<PathFragment, Artifact> bitcodeFiles;
private Artifact imports;
private static final String GUID = "72ce1eca-4625-4e24-a0d8-bb91bb8b0e0e";
- public LTOBackendAction(
+ public LtoBackendAction(
Collection<Artifact> inputs,
Map<PathFragment, Artifact> allBitcodeFiles,
Artifact importsFile,
@@ -188,7 +188,7 @@ public final class LTOBackendAction extends SpawnAction {
return f.hexDigestAndReset();
}
- /** Builder class to construct {@link LTOBackendAction} instances. */
+ /** Builder class to construct {@link LtoBackendAction} instances. */
public static class Builder extends SpawnAction.Builder {
private Map<PathFragment, Artifact> bitcodeFiles;
private Artifact imports;
@@ -214,7 +214,7 @@ public final class LTOBackendAction extends SpawnAction {
String progressMessage,
RunfilesSupplier runfilesSupplier,
String mnemonic) {
- return new LTOBackendAction(
+ return new LtoBackendAction(
inputsAndTools.toCollection(),
bitcodeFiles,
imports,
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java
index 9d900a01a0..5ce2611187 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LtoBackendArtifacts.java
@@ -27,7 +27,7 @@ import java.util.List;
import java.util.Map;
/**
- * LTOBackendArtifacts represents a set of artifacts for a single ThinLTO backend compile.
+ * LtoBackendArtifacts represents a set of artifacts for a single ThinLTO backend compile.
*
* <p>ThinLTO expands the traditional 2 step compile (N x compile .cc, 1x link (N .o files) into a 4
* step process:
@@ -38,7 +38,7 @@ import java.util.Map;
* <li>2. Indexing (once on N files). This takes all bitcode .o files, and for each .o file, it
* decides from which other .o files symbols can be inlined. In addition, it generates an index
* for looking up these symbols, and an imports file for identifying new input files for each
- * step 3 {@link LTOBackendAction}.
+ * step 3 {@link LtoBackendAction}.
* <li>3. Backend compile (N times). This is the traditional compilation, and uses the same command
* line as the Bitcode generation in 1). Since the compiler has many bit code files available,
* it can inline functions and propagate constants across .o files. This step is costly, as it
@@ -46,7 +46,7 @@ import java.util.Map;
* <li>4. Backend link (once). This is the traditional link, and produces the final executable.
* </ul>
*/
-public final class LTOBackendArtifacts {
+public final class LtoBackendArtifacts {
// A file containing mapping of symbol => bitcode file containing the symbol.
private final Artifact index;
@@ -61,7 +61,7 @@ public final class LTOBackendArtifacts {
private final Artifact objectFile;
// A map of all of the bitcode files. This is the universe from which the .imports file
- // distills its lists. The map is the same across all LTOBackendArtifacts of a given
+ // distills its lists. The map is the same across all LtoBackendArtifacts of a given
// binary.
private final Map<PathFragment, Artifact> bitcodeFiles;
@@ -69,7 +69,7 @@ public final class LTOBackendArtifacts {
// the feature configuration and user-provided linkopts.
private List<String> commandLine;
- LTOBackendArtifacts(
+ LtoBackendArtifacts(
PathFragment ltoOutputRootPrefix,
Artifact bitcodeFile,
Map<PathFragment, Artifact> allBitCodeFiles,
@@ -105,14 +105,14 @@ public final class LTOBackendArtifacts {
commandLine = cmdLine;
}
- public void scheduleLTOBackendAction(
+ public void scheduleLtoBackendAction(
RuleContext ruleContext,
FeatureConfiguration featureConfiguration,
CcToolchainProvider ccToolchain,
FdoSupportProvider fdoSupport,
boolean usePic,
boolean generateDwo) {
- LTOBackendAction.Builder builder = new LTOBackendAction.Builder();
+ LtoBackendAction.Builder builder = new LtoBackendAction.Builder();
builder.addImportsInfo(bitcodeFiles, imports);
builder.addInput(bitcodeFile);
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 1ed477e97c..f49caa181b 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
@@ -217,8 +217,8 @@ public abstract class NativeDepsHelper {
}
ImmutableMap.Builder<Artifact, Artifact> ltoBitcodeFilesMap = new ImmutableMap.Builder<>();
for (LibraryToLink lib : linkerInputs) {
- if (!lib.getLTOBitcodeFiles().isEmpty()) {
- ltoBitcodeFilesMap.putAll(lib.getLTOBitcodeFiles());
+ if (!lib.getLtoBitcodeFiles().isEmpty()) {
+ ltoBitcodeFilesMap.putAll(lib.getLtoBitcodeFiles());
}
}
builder
@@ -231,17 +231,17 @@ public abstract class NativeDepsHelper {
.addLinkopts(linkopts)
.setNativeDeps(true)
.addLinkstamps(linkstamps)
- .addLTOBitcodeFiles(ltoBitcodeFilesMap.build());
+ .addLtoBitcodeFiles(ltoBitcodeFilesMap.build());
if (!builder.getLtoBitcodeFiles().isEmpty()
&& featureConfiguration.isEnabled(CppRuleClasses.THIN_LTO)) {
- builder.setLTOIndexing(true);
- builder.setUsePicForLTOBackendActions(CppHelper.usePic(ruleContext, false));
- builder.setUseFissionForLTOBackendActions(
+ builder.setLtoIndexing(true);
+ builder.setUsePicForLtoBackendActions(CppHelper.usePic(ruleContext, false));
+ builder.setUseFissionForLtoBackendActions(
ruleContext.getFragment(CppConfiguration.class).useFission());
CppLinkAction indexAction = builder.build();
ruleContext.registerAction(indexAction);
- builder.setLTOIndexing(false);
+ builder.setLtoIndexing(false);
}
CppLinkAction linkAction = builder.build();
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/LTOBackendActionTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/LtoBackendActionTest.java
index 9e87bc22d8..d8a2247de6 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/cpp/LTOBackendActionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/LtoBackendActionTest.java
@@ -40,9 +40,9 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-/** Tests {@link com.google.devtools.build.lib.rules.cpp.LTOBackendAction}. */
+/** Tests {@link com.google.devtools.build.lib.rules.cpp.LtoBackendAction}. */
@RunWith(JUnit4.class)
-public class LTOBackendActionTest extends BuildViewTestCase {
+public class LtoBackendActionTest extends BuildViewTestCase {
private Artifact bitcode1Artifact;
private Artifact bitcode2Artifact;
private Artifact index1Artifact;
@@ -83,7 +83,7 @@ public class LTOBackendActionTest extends BuildViewTestCase {
@Test
public void testEmptyImports() throws Exception {
Action[] actions =
- new LTOBackendAction.Builder()
+ new LtoBackendAction.Builder()
.addImportsInfo(allBitcodeFiles, imports1Artifact)
.addInput(bitcode1Artifact)
.addInput(index1Artifact)
@@ -92,7 +92,7 @@ public class LTOBackendActionTest extends BuildViewTestCase {
.setProgressMessage("Test")
.build(ActionsTestUtil.NULL_ACTION_OWNER, collectingAnalysisEnvironment, targetConfig);
collectingAnalysisEnvironment.registerAction(actions);
- LTOBackendAction action = (LTOBackendAction) actions[0];
+ LtoBackendAction action = (LtoBackendAction) actions[0];
assertThat(action.getOwner().getLabel())
.isEqualTo(ActionsTestUtil.NULL_ACTION_OWNER.getLabel());
assertThat(action.getInputs()).containsExactly(bitcode1Artifact, index1Artifact);
@@ -112,7 +112,7 @@ public class LTOBackendActionTest extends BuildViewTestCase {
@Test
public void testNonEmptyImports() throws Exception {
Action[] actions =
- new LTOBackendAction.Builder()
+ new LtoBackendAction.Builder()
.addImportsInfo(allBitcodeFiles, imports2Artifact)
.addInput(bitcode2Artifact)
.addInput(index2Artifact)
@@ -121,7 +121,7 @@ public class LTOBackendActionTest extends BuildViewTestCase {
.setProgressMessage("Test")
.build(ActionsTestUtil.NULL_ACTION_OWNER, collectingAnalysisEnvironment, targetConfig);
collectingAnalysisEnvironment.registerAction(actions);
- LTOBackendAction action = (LTOBackendAction) actions[0];
+ LtoBackendAction action = (LtoBackendAction) actions[0];
assertThat(action.getOwner().getLabel())
.isEqualTo(ActionsTestUtil.NULL_ACTION_OWNER.getLabel());
assertThat(action.getInputs()).containsExactly(bitcode2Artifact, index2Artifact);
@@ -160,7 +160,7 @@ public class LTOBackendActionTest extends BuildViewTestCase {
new ActionCombinationFactory<KeyAttributes>() {
@Override
public Action generate(ImmutableSet<KeyAttributes> attributesToFlip) {
- LTOBackendAction.Builder builder = new LTOBackendAction.Builder();
+ LtoBackendAction.Builder builder = new LtoBackendAction.Builder();
builder.addOutput(destinationArtifact);
PathFragment executable =