summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--breakpad/BUILD.gn14
-rw-r--r--breakpad/breakpad.gyp16
-rw-r--r--components/crash.gypi8
-rw-r--r--components/crash/content/app/BUILD.gn7
4 files changed, 45 insertions, 0 deletions
diff --git a/breakpad/BUILD.gn b/breakpad/BUILD.gn
index be2fe55..231abcc 100644
--- a/breakpad/BUILD.gn
+++ b/breakpad/BUILD.gn
@@ -554,6 +554,13 @@ if (is_linux || is_android) {
cflags = [ "-marm" ]
}
+ if (current_cpu == "x86" && is_clang) {
+ # Clang's -mstackrealign doesn't work well with
+ # linux_syscall_support.h hand written asm syscalls.
+ # See https://crbug.com/556393
+ cflags -= [ "-mstackrealign" ]
+ }
+
if (is_android) {
sources += [ "src/common/android/breakpad_getcontext.S" ]
}
@@ -659,6 +666,13 @@ if (is_linux || is_android) {
libs = [ "log" ]
include_dirs += [ "src/common/android/include" ]
}
+
+ if (current_cpu == "x86" && is_clang) {
+ # Clang's -mstackrealign doesn't work well with
+ # linux_syscall_support.h hand written asm syscalls.
+ # See https://crbug.com/556393
+ cflags -= [ "-mstackrealign" ]
+ }
}
executable("linux_dumper_unittest_helper") {
diff --git a/breakpad/breakpad.gyp b/breakpad/breakpad.gyp
index 5592748..69ce5be 100644
--- a/breakpad/breakpad.gyp
+++ b/breakpad/breakpad.gyp
@@ -594,6 +594,14 @@
],
},
}],
+ ['clang==1 and target_arch=="ia32"', {
+ 'cflags!': [
+ # Clang's -mstackrealign doesn't work well with
+ # linux_syscall_support.h hand written asm syscalls.
+ # See https://crbug.com/556393
+ '-mstackrealign',
+ ],
+ }],
],
'include_dirs': [
@@ -703,6 +711,14 @@
},
'includes': [ '../build/android/test_runner.gypi' ],
}],
+ ['clang==1 and target_arch=="ia32"', {
+ 'cflags!': [
+ # Clang's -mstackrealign doesn't work well with
+ # linux_syscall_support.h hand written asm syscalls.
+ # See https://crbug.com/556393
+ '-mstackrealign',
+ ],
+ }],
],
},
{
diff --git a/components/crash.gypi b/components/crash.gypi
index f2e790c..3571a82 100644
--- a/components/crash.gypi
+++ b/components/crash.gypi
@@ -158,6 +158,14 @@
'../breakpad/src',
],
}],
+ ['clang==1 and target_arch=="ia32"', {
+ 'cflags!': [
+ # Clang's -mstackrealign doesn't work well with
+ # linux_syscall_support.h hand written asm syscalls.
+ # See https://crbug.com/556393
+ '-mstackrealign',
+ ],
+ }],
],
'target_conditions': [
# Need 'target_conditions' to override default filename_rules to include
diff --git a/components/crash/content/app/BUILD.gn b/components/crash/content/app/BUILD.gn
index 5bd0494..b4fbe74 100644
--- a/components/crash/content/app/BUILD.gn
+++ b/components/crash/content/app/BUILD.gn
@@ -114,6 +114,13 @@ source_set("app_non_mac_win") {
defines += [ "CHROME_BUILD_ID=\"$android_chrome_build_id\"" ]
}
+ if (current_cpu == "x86" && is_clang) {
+ # Clang's -mstackrealign doesn't work well with
+ # linux_syscall_support.h hand written asm syscalls.
+ # See https://crbug.com/556393
+ cflags -= [ "-mstackrealign" ]
+ }
+
if (is_win) {
deps += [
"//breakpad:breakpad_handler",