diff options
author | Googler <noreply@google.com> | 2017-03-15 16:37:21 +0000 |
---|---|---|
committer | Yun Peng <pcloudy@google.com> | 2017-03-16 08:35:14 +0000 |
commit | e4d2b1d5bd6a1ec0ccc060d1355fe1196a7d389c (patch) | |
tree | afb788077c25990016c0010b01bbfdce63a47022 /src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java | |
parent | 1fc4dff2f00c0593413235c46acbc2f0ddbef3f4 (diff) |
Add ThinLTO support for py_binary targets.
Builds of py_binary targets were failing with --features=thin_lto
during the link because the C++ source files were compiled into
bitcode, but the link (which is set up by GooglePythonSemantics.java) did
not have support for ThinLTO actions and attempted to do a native link of
the bitcode objects.
--
PiperOrigin-RevId: 150201765
MOS_MIGRATED_REVID=150201765
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.java | 1 |
1 files changed, 1 insertions, 0 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 22201abdc4..ac15e13c76 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 @@ -289,6 +289,7 @@ public class CppLinkActionBuilder { this.nonCodeInputs.addAll(linkContext.nonCodeInputs); this.libraries.addTransitive(linkContext.libraries); this.crosstoolInputs = linkContext.crosstoolInputs; + this.ltoBitcodeFiles.addAll(linkContext.ltoBitcodeFiles); this.runtimeMiddleman = linkContext.runtimeMiddleman; this.runtimeInputs = linkContext.runtimeInputs; this.runtimeType = linkContext.runtimeType; |