Move -mstackrealign into clang_stackrealign on Android
This way -mstackrealign is removed for breakpad sources to avoid a clang bug on x86-32. Bug: 751188 Change-Id: I9b7aeee2585f2e397a6dacfe01cd9a61458b37e0 Reviewed-on: https://chromium-review.googlesource.com/627671 Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#496650} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: ca900bdc47a962988f18fec95305b4714db6a429
This commit is contained in:
Родитель
337452ad1b
Коммит
b696620bfa
|
@ -371,13 +371,7 @@ config("compiler") {
|
|||
ldflags += [ "-fuse-ld=lld" ]
|
||||
} else if (use_gold) {
|
||||
ldflags += [ "-fuse-ld=gold" ]
|
||||
if (is_android) {
|
||||
# Use -mstackrealign due to a bug on ia32 Jelly Bean.
|
||||
# See crbug.com/521527
|
||||
if (current_cpu == "x86") {
|
||||
cflags += [ "-mstackrealign" ]
|
||||
}
|
||||
} else {
|
||||
if (!is_android) {
|
||||
# On Android, this isn't needed. gcc in the NDK knows to look next to
|
||||
# it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
|
||||
# above.
|
||||
|
@ -896,12 +890,14 @@ config("compiler_codegen") {
|
|||
# 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_linux) {
|
||||
cflags = [
|
||||
if (is_clang && current_cpu == "x86" && (is_android || is_linux)) {
|
||||
# Android needs -mstackrealign due to a bug on ia32 Jelly Bean.
|
||||
# See crbug.com/521527
|
||||
cflags = [ "-mstackrealign" ]
|
||||
if (is_linux) {
|
||||
# Align the stack on 16-byte boundaries, http://crbug.com/418554.
|
||||
"-mstack-alignment=16",
|
||||
"-mstackrealign",
|
||||
]
|
||||
cflags += [ "-mstack-alignment=16" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче