aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-10-14 23:23:26 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-10-17 11:19:27 +0000
commitdb6f5f26b50e6b0aa3837e7cb3cd595c9ae47ecf (patch)
treed97891215ed57186cbeccab1e3bd2abedc700050 /src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
parentb776d6c12e952eb358c1a036cc9d93d8944c4c77 (diff)
Augment the CppLinkInfo extra action proto with the command line of the linker.
Currently, the proto only includes the linkopt arguments collected from the rules, which are insufficient for reconstructing the linking step in the extra action listener. This CL adds the complete command line needed to re-run the linking step. -- MOS_MIGRATED_REVID=136211307
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java3
1 files changed, 2 insertions, 1 deletions
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 af2e1eebb4..44004745a0 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
@@ -177,6 +177,7 @@ public final class CppLinkAction extends AbstractAction
return getCppConfiguration().getHostSystemName();
}
+ @Override
public ImmutableMap<String, String> getEnvironment() {
ImmutableMap.Builder<String, String> result = ImmutableMap.<String, String>builder();
@@ -403,7 +404,7 @@ public final class CppLinkAction extends AbstractAction
info.addAllLinkStamp(Artifact.toExecPaths(getLinkCommandLine().getLinkstamps().values()));
info.addAllBuildInfoHeaderArtifact(
Artifact.toExecPaths(getLinkCommandLine().getBuildInfoHeaderArtifacts()));
- info.addAllLinkOpt(getLinkCommandLine().getLinkopts());
+ info.addAllLinkOpt(getLinkCommandLine().getRawLinkArgv());
return super.getExtraActionInfo()
.setExtension(CppLinkInfo.cppLinkInfo, info.build());