Differential D38165 Diff 118368 www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn
--- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2020-11-07 01:22:36 UTC | --- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2021-12-15 16:12:54 UTC | ||||
+++ src/3rdparty/chromium/build/config/compiler/BUILD.gn | +++ src/3rdparty/chromium/build/config/compiler/BUILD.gn | ||||
@@ -144,7 +144,7 @@ declare_args() { | @@ -134,7 +134,7 @@ declare_args() { | ||||
# 'is_android' breaks content_shell_test_apk on android-kitkat-arm-rel. | # | ||||
# 'use_xcode_clang' may call old clang. | # TODO(crbug.com/977230): Enabling this when 'use_xcode_clang' is true may | ||||
init_stack_vars = | # call an old clang that doesn't support auto-init. | ||||
- !is_android && !use_xcode_clang && (!is_official_build || is_linux) | - init_stack_vars = !is_android && !use_xcode_clang | ||||
+ !is_android && !use_xcode_clang && (!is_official_build || is_linux) && !is_bsd | + init_stack_vars = !is_android && !use_xcode_clang && !is_bsd | ||||
# This argument is to control whether enabling text section splitting in the | # This argument is to control whether enabling text section splitting in the | ||||
# final binary. When enabled, the separated text sections with prefix | # final binary. When enabled, the separated text sections with prefix | ||||
@@ -313,7 +313,7 @@ config("compiler") { | @@ -297,7 +297,7 @@ config("compiler") { | ||||
} | } | ||||
# Linker warnings. | # Linker warnings. | ||||
- if (fatal_linker_warnings && !is_mac && !is_ios && current_os != "aix") { | - if (fatal_linker_warnings && !is_apple && current_os != "aix") { | ||||
+ if (fatal_linker_warnings && !is_mac && !is_ios && !is_bsd && current_os != "aix") { | + if (fatal_linker_warnings && !is_apple && !is_bsd && current_os != "aix") { | ||||
ldflags += [ "-Wl,--fatal-warnings" ] | ldflags += [ "-Wl,--fatal-warnings" ] | ||||
} | } | ||||
if (fatal_linker_warnings && (is_mac || is_ios)) { | if (fatal_linker_warnings && is_apple && | ||||
@@ -419,7 +419,7 @@ config("compiler") { | @@ -407,7 +407,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", | ||||
@@ -518,7 +518,7 @@ config("compiler") { | @@ -795,7 +795,7 @@ config("compiler_cpu_abi") { | ||||
ldflags += [ "-Wl,-z,keep-text-section-prefix" ] | |||||
} | |||||
- if (is_clang && !is_nacl && !use_xcode_clang && !use_qt) { | |||||
+ if (is_clang && !is_nacl && !use_xcode_clang && !use_qt && !is_bsd) { | |||||
cflags += [ "-fcrash-diagnostics-dir=" + | |||||
rebase_path("//tools/clang/crashreports", root_build_dir) ] | |||||
@@ -789,7 +789,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" ] | ||||
} | } | ||||
@@ -1139,7 +1139,7 @@ config("compiler_deterministic") { | @@ -1148,7 +1148,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,." ] | ||||
} | } | ||||
@@ -1541,7 +1541,7 @@ config("default_warnings") { | @@ -1550,7 +1550,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 += [ | ||||
@@ -1791,7 +1791,7 @@ config("thin_archive") { | @@ -1724,7 +1724,7 @@ config("no_chromium_code") { | ||||
# suppressing them individually, we just blanket suppress them here. | |||||
"-Wno-unused-variable", | |||||
] | |||||
- if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang)) { | |||||
+ if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) { | |||||
cflags += [ | |||||
# TODO(https://crbug.com/1031169): Clean up and enable. | |||||
"-Wno-misleading-indentation", | |||||
@@ -1802,7 +1802,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_apple) || is_fuchsia) { | ||||
+ if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { | + if ((is_posix && !is_nacl && !is_apple && !is_bsd) || is_fuchsia) { | ||||
arflags = [ "-T" ] | arflags = [ "-T" ] | ||||
} else if (is_win && use_lld) { | } else if (is_win && use_lld) { | ||||
arflags = [ "/llvmlibthin" ] | arflags = [ "/llvmlibthin" ] | ||||
@@ -2323,7 +2323,7 @@ config("symbols") { | @@ -2343,7 +2343,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 (is_clang && !is_nacl && !use_xcode_clang && !use_qt) { | # TODO(https://crbug.com/1050118): Investigate missing debug info on mac. | ||||
@@ -2351,7 +2351,7 @@ config("symbols") { | @@ -2385,7 +2385,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_apple && !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. |