[Linux] Turn off -mstackrealign for breakpad in ia32.
There's a clang bug which causes crashes of syscalls which use many registers for argument passing in ia32 architecture. https://llvm.org/bugs/show_bug.cgi?id=16830 BUG=556393 Review URL: https://codereview.chromium.org/1473203002 Cr-Commit-Position: refs/heads/master@{#365770}
This commit is contained in:
@ -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") {
|
||||
|
@ -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',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user