Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4575)

Unified Diff: chrome/test/data/nacl/BUILD.gn

Issue 2343063002: ThinLTO: workaround LLVM bug related to -nostdlib. (Closed)
Patch Set: revert debug change Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/nacl/BUILD.gn
diff --git a/chrome/test/data/nacl/BUILD.gn b/chrome/test/data/nacl/BUILD.gn
index 754e19e364de92fecbc5ee66ed1f2b796420a5b9..64e5d25b7b6e506f372f374d9291ba946ec6f188 100644
--- a/chrome/test/data/nacl/BUILD.gn
+++ b/chrome/test/data/nacl/BUILD.gn
@@ -4,6 +4,7 @@
import("//build/config/features.gni")
import("//build/config/nacl/config.gni")
+import("//build/toolchain/toolchain.gni")
import("//ppapi/native_client/nacl_test_data.gni")
group("nacl") {
@@ -553,6 +554,19 @@ if (is_linux && is_clang) {
# .exidx sections without this flag.
"-fno-unwind-tables",
]
+
+ # Workaround against LLVM bug.
+ # In short, an LTO optimization pass might recognize
+ # naive implementations of builtins (such as memset)
+ # and replace them with references to the real builtins,
+ # which, in the case of -nostdlib, might cause the binary
+ # to get undefined references to those symbols.
+ #
+ # See more details:
+ # https://llvm.org/bugs/show_bug.cgi?id=30403
+ if (use_thin_lto) {
+ ldflags = [ "-Wl,-plugin-opt,O0" ]
+ }
}
executable("nonsfi_libc_free_nexe") {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698