Changeset View
Changeset View
Standalone View
Standalone View
head/www/chromium/files/patch-build_config_compiler_BUILD.gn
--- build/config/compiler/BUILD.gn.orig 2019-12-16 21:51:21 UTC | --- build/config/compiler/BUILD.gn.orig 2020-03-03 18:53:47 UTC | ||||
+++ build/config/compiler/BUILD.gn | +++ build/config/compiler/BUILD.gn | ||||
@@ -57,7 +57,7 @@ declare_args() { | @@ -57,7 +57,7 @@ declare_args() { | ||||
# only two architectures that are currently checked in). Turn this off when | # only two architectures that are currently checked in). Turn this off when | ||||
# you are using a custom toolchain and need to control -B in cflags. | # you are using a custom toolchain and need to control -B in cflags. | ||||
linux_use_bundled_binutils = | linux_use_bundled_binutils = | ||||
- linux_use_bundled_binutils_override && is_linux && | - linux_use_bundled_binutils_override && is_linux && | ||||
+ linux_use_bundled_binutils_override && (is_linux && !is_bsd) && | + linux_use_bundled_binutils_override && (is_linux && !is_bsd) && | ||||
(current_cpu == "x64" || current_cpu == "x86") | (current_cpu == "x64" || current_cpu == "x86") | ||||
binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", | binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", | ||||
root_build_dir) | root_build_dir) | ||||
@@ -303,7 +303,7 @@ config("compiler") { | @@ -308,7 +308,7 @@ config("compiler") { | ||||
# Linker warnings. | # Linker warnings. | ||||
if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && | if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && | ||||
- !is_mac && !is_ios && current_os != "aix") { | - !is_mac && !is_ios && current_os != "aix") { | ||||
+ !is_mac && !is_ios && current_os != "aix" && !is_bsd) { | + !is_mac && !is_ios && current_os != "aix" && !is_bsd) { | ||||
# TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 | # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 | ||||
ldflags += [ "-Wl,--fatal-warnings" ] | ldflags += [ "-Wl,--fatal-warnings" ] | ||||
} | } | ||||
@@ -398,7 +398,7 @@ config("compiler") { | @@ -403,7 +403,7 @@ config("compiler") { | ||||
# Compiler instrumentation can introduce dependencies in DSOs to symbols in | # Compiler instrumentation can introduce dependencies in DSOs to symbols in | ||||
# the executable they are loaded into, so they are unresolved at link-time. | # the executable they are loaded into, so they are unresolved at link-time. | ||||
- if (!using_sanitizer) { | - if (!using_sanitizer) { | ||||
+ if (!using_sanitizer && !is_bsd) { | + if (!using_sanitizer && !is_bsd) { | ||||
ldflags += [ | ldflags += [ | ||||
"-Wl,-z,defs", | "-Wl,-z,defs", | ||||
"-Wl,--as-needed", | "-Wl,--as-needed", | ||||
@@ -498,7 +498,7 @@ config("compiler") { | @@ -503,7 +503,7 @@ config("compiler") { | ||||
} | } | ||||
} | } | ||||
- if (is_clang && !is_nacl && !use_xcode_clang) { | - if (is_clang && !is_nacl && !use_xcode_clang) { | ||||
+ if (is_clang && !is_nacl && !use_xcode_clang && !is_bsd) { | + if (is_clang && !is_nacl && !use_xcode_clang && !is_bsd) { | ||||
cflags += [ "-fcrash-diagnostics-dir=" + | cflags += [ "-fcrash-diagnostics-dir=" + | ||||
rebase_path("//tools/clang/crashreports", root_build_dir) ] | rebase_path("//tools/clang/crashreports", root_build_dir) ] | ||||
@@ -768,7 +768,7 @@ config("compiler_cpu_abi") { | @@ -773,7 +773,7 @@ config("compiler_cpu_abi") { | ||||
cflags += [ "-mtune=$arm_tune" ] | cflags += [ "-mtune=$arm_tune" ] | ||||
} | } | ||||
} else if (current_cpu == "arm64") { | } else if (current_cpu == "arm64") { | ||||
- if (is_clang && !is_android && !is_nacl && !is_fuchsia) { | - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { | ||||
+ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { | + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { | ||||
cflags += [ "--target=aarch64-linux-gnu" ] | cflags += [ "--target=aarch64-linux-gnu" ] | ||||
ldflags += [ "--target=aarch64-linux-gnu" ] | ldflags += [ "--target=aarch64-linux-gnu" ] | ||||
} | } | ||||
@@ -1119,7 +1119,7 @@ config("compiler_deterministic") { | @@ -1124,7 +1124,7 @@ config("compiler_deterministic") { | ||||
"-Xclang", | "-Xclang", | ||||
".", | ".", | ||||
] | ] | ||||
- if (!is_win) { | - if (!is_win) { | ||||
+ if (!is_win && !is_bsd) { | + if (!is_win && !is_bsd) { | ||||
# We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) | # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167) | ||||
asmflags = [ "-Wa,-fdebug-compilation-dir,." ] | asmflags = [ "-Wa,-fdebug-compilation-dir,." ] | ||||
} | } | ||||
@@ -1508,7 +1508,7 @@ config("default_warnings") { | @@ -1513,7 +1513,7 @@ config("default_warnings") { | ||||
cflags += [ "-Wno-nonportable-include-path" ] | cflags += [ "-Wno-nonportable-include-path" ] | ||||
} | } | ||||
- if (current_toolchain == host_toolchain || !use_xcode_clang) { | - if (current_toolchain == host_toolchain || !use_xcode_clang) { | ||||
+ if ((current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { | + if ((current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { | ||||
# Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not | # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not | ||||
# recognize. | # recognize. | ||||
cflags += [ | cflags += [ | ||||
@@ -1738,7 +1738,7 @@ config("thin_archive") { | @@ -1761,7 +1761,7 @@ config("thin_archive") { | ||||
# Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't | # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't | ||||
# have a "thin archive" mode (it does accept -T, but it means truncating | # have a "thin archive" mode (it does accept -T, but it means truncating | ||||
# archive names to 16 characters, which is not what we want). | # archive names to 16 characters, which is not what we want). | ||||
- if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { | - if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { | ||||
+ if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { | + if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { | ||||
arflags = [ "-T" ] | arflags = [ "-T" ] | ||||
} else if (is_win && use_lld) { | } else if (is_win && use_lld) { | ||||
arflags = [ "/llvmlibthin" ] | arflags = [ "/llvmlibthin" ] | ||||
@@ -2328,7 +2328,7 @@ config("symbols") { | @@ -2351,7 +2351,7 @@ config("symbols") { | ||||
# flag, so we can use use -g1 for pnacl and nacl-clang compiles. | # flag, so we can use use -g1 for pnacl and nacl-clang compiles. | ||||
# gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang. | # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang. | ||||
if (!is_nacl || is_clang) { | if (!is_nacl || is_clang) { | ||||
- cflags += [ "-g2" ] | - cflags += [ "-g2" ] | ||||
+ cflags += [ "-g0" ] | + cflags += [ "-g0" ] | ||||
} | } | ||||
if (use_debug_fission && !is_nacl && !is_android) { | if (use_debug_fission && !is_nacl && !is_android) { | ||||
@@ -2349,7 +2349,7 @@ config("symbols") { | @@ -2372,7 +2372,7 @@ config("symbols") { | ||||
# DWARF info may be corrupt; offsets in a range list entry are in different | # 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. | # sections" there. Maybe just a bug in nacl_switch_32.S. | ||||
if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" && | if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" && | ||||
- (use_gold || use_lld)) { | - (use_gold || use_lld)) { | ||||
+ (use_gold || use_lld) && !is_bsd) { | + (use_gold || use_lld) && !is_bsd) { | ||||
if (is_clang) { | if (is_clang) { | ||||
# This flag enables the GNU-format pubnames and pubtypes sections, | # This flag enables the GNU-format pubnames and pubtypes sections, | ||||
# which lld needs in order to generate a correct GDB index. | # which lld needs in order to generate a correct GDB index. |