aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-10-18 16:18:29 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-10-19 08:26:14 +0000
commitdf8675f71b64c0cea8c0a9e317360a7775023a85 (patch)
tree91bb1a0a2852abd212c95797124be1100b2d55bb /src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java
parentbaeed33796379283a3539032d3dc8cbc109c2aa2 (diff)
Fix ThinLTO indexing linkstamp handling
We were including the linkstamp object file in the linker inputs on the command line for the LTO indexing step, despite not adding the linkstamp compile command or the files to the inputs and outputs, causing an error. The linkstamp file is not compiled in ThinLTO mode. The linkstamp is correctly added to the final native link. The fix is to not pass the linkstampMap to the CppLinkVariablesExtension for the LTO indexing step. Passing in the map causes the linkstamp outputs to be added to the buildVariables, resulting in the outputs being added to the command line via the featureConfiguration. Added linkstamps to several of the ThinLTO tests. -- MOS_MIGRATED_REVID=136480400
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java2
1 files changed, 1 insertions, 1 deletions
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 368db93b9b..543f35e87d 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
@@ -554,7 +554,7 @@ public class CppLinkActionBuilder {
isLTOIndexing
? new CppLinkVariablesExtension(
configuration,
- linkstampMap,
+ ImmutableMap.of(),
needWholeArchive,
linkerInputs,
runtimeLinkerInputs,