From db6f5f26b50e6b0aa3837e7cb3cd595c9ae47ecf Mon Sep 17 00:00:00 2001 From: Googler Date: Fri, 14 Oct 2016 23:23:26 +0000 Subject: 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 --- .../java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java') 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 getEnvironment() { ImmutableMap.Builder result = ImmutableMap.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()); -- cgit v1.2.3