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

Unified Diff: build/config/compiler/BUILD.gn

Issue 638053003: Linux: Synchronize a few GN build flags with GYP. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: double quotes Created 6 years, 2 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: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 42c254c08c5f8df1eb079ae3453cdeee6a72acbb..dfe8af1ffbcdc3257c9d4286ba1a8dd5f67c80f8 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -168,6 +168,16 @@ config("compiler") {
} else if (cpu_arch == "x86") {
cflags += [ "-m32" ]
ldflags += [ "-m32" ]
+ if (is_clang) {
+ cflags += [
+ # Else building libyuv gives clang's register allocator issues,
+ # see llvm.org/PR15798 / crbug.com/233709
+ "-momit-leaf-frame-pointer",
+ # Align the stack on 16-byte boundaries, http://crbug.com/418554.
+ "-mstack-alignment=16",
+ "-mstackrealign",
+ ]
+ }
} else if (cpu_arch == "arm") {
# Don't set the compiler flags for the WebView build. These will come
# from the Android build system.
@@ -253,12 +263,8 @@ config("compiler") {
# gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
"-fuse-ld=gold",
- # There seems to be a conflict of --icf and -pie in gold which can
- # generate crashy binaries. As a security measure, -pie takes
- # precedence for now.
# TODO(brettw) common.gypi has this only for target toolset.
- #"-Wl,--icf=safe",
- "-Wl,--icf=none",
+ "-Wl,--icf=safe",
# Experimentation found that using four linking threads
# saved ~20% of link time.
« 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