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

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

Issue 1598523002: GN: Move x86 Clang -mstackrealign workaround to its own config, elide it where problematic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « build/config/BUILDCONFIG.gn ('k') | components/crash/content/app/BUILD.gn » ('j') | 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 ab0d6c5f06a9cc1d1d97975a26926d620b15c422..60954b3dcc064e606e2db5f8ed1ac909c60b413f 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -575,10 +575,6 @@ config("compiler_codegen") {
# 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 (current_cpu == "arm") {
@@ -603,6 +599,20 @@ config("compiler_codegen") {
asmflags = cflags
}
+# This is separate from :compiler_codegen (and not even a sub-config there)
+# so that some targets can remove it from the list with:
+# configs -= [ "//build/config/compiler:clang_stackrealign" ]
+# See https://crbug.com/556393 for details of where it must be avoided.
+config("clang_stackrealign") {
+ if (is_clang && current_cpu == "x86" && !is_nacl) {
+ cflags = [
+ # Align the stack on 16-byte boundaries, http://crbug.com/418554.
+ "-mstack-alignment=16",
+ "-mstackrealign",
+ ]
+ }
+}
+
config("compiler_arm_fpu") {
if (current_cpu == "arm" && !is_ios && !is_nacl) {
cflags = [ "-mfpu=$arm_fpu" ]
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | components/crash/content/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698