Commit 92013e54 authored by Torne (Richard Coles)'s avatar Torne (Richard Coles) Committed by Commit Bot

Fix compiler flags incorrectly checking target_cpu.

Various GN conditions check target_cpu when deciding which compiler
flags to apply; they should be checking current_cpu instead so that
builds with more than one toolchain use the correct flags for each
toolchain. This was causing the DWARF version workaround for
crbug.com/744956 to not be applied on the 64-bit build when using the
32-bit toolchain.

Bug: 744956, 889937
Change-Id: Id2f4ecafd762e36ed3593fb45f6a6062bf8f6326
Reviewed-on: https://chromium-review.googlesource.com/1249393Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Richard Coles <torne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594791}
parent ec20e3a2
......@@ -2230,7 +2230,7 @@ config("symbols") {
}
} else {
cflags = []
if (!use_debug_fission && target_cpu == "arm") {
if (!use_debug_fission && current_cpu == "arm") {
# dump_syms has issues with dwarf4 on arm, https://crbug.com/744956
# TODO(thakis): Remove this again once dump_syms is fixed.
#
......@@ -2260,7 +2260,7 @@ config("symbols") {
# obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
# DWARF info may be corrupt; offsets in a range list entry are in different
# sections" there. Maybe just a bug in nacl_switch_32.S.
if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" &&
if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" &&
(use_gold || use_lld)) {
if (is_clang) {
# This flag enables the GNU-format pubnames and pubtypes sections,
......@@ -2293,7 +2293,7 @@ config("minimal_symbols") {
}
} else {
cflags = []
if (target_cpu == "arm") {
if (current_cpu == "arm") {
# dump_syms has issues with dwarf4 on arm, https://crbug.com/744956
# TODO(thakis): Remove this again once dump_syms is fixed.
cflags += [ "-gdwarf-3" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment