Don't register linkstamp compile actions when we're doing thinlto indexing step
RELNOTES: None.
@@ -1004,6 +1004,7 @@ public class CppLinkActionBuilder {
LinkCommandLine linkCommandLine = linkCommandLineBuilder.build();
+ if (!isLtoIndexing) {
for (Entry<Linkstamp, Artifact> linkstampEntry : linkstampMap.entrySet()) {
analysisEnvironment.registerAction(
CppLinkstampCompileHelper.createLinkstampCompileAction(
@@ -1020,7 +1021,8 @@ public class CppLinkActionBuilder {
CppHelper.getFdoBuildStamp(ruleContext, fdoSupport.getFdoSupport()),
featureConfiguration,
cppConfiguration.forcePic()
- || (linkType == LinkTargetType.DYNAMIC_LIBRARY && toolchain.toolchainNeedsPic()),
+ || (linkType == LinkTargetType.DYNAMIC_LIBRARY
+ && toolchain.toolchainNeedsPic()),
Matcher.quoteReplacement(
isNativeDeps && cppConfiguration.shareNativeDeps()
? output.getExecPathString()
@@ -1028,6 +1030,7 @@ public class CppLinkActionBuilder {
Matcher.quoteReplacement(output.getExecPathString()),
cppSemantics));
}
+ }
// Compute the set of inputs - we only need stable order here.
NestedSetBuilder<Artifact> dependencyInputsBuilder = NestedSetBuilder.stableOrder();
