diff options
Diffstat (limited to 'www-client/chromium/files/chromium-137-compiler.patch')
-rw-r--r-- | www-client/chromium/files/chromium-137-compiler.patch | 73 |
1 files changed, 47 insertions, 26 deletions
diff --git a/www-client/chromium/files/chromium-137-compiler.patch b/www-client/chromium/files/chromium-137-compiler.patch index b9935ec..b60d49f 100644 --- a/www-client/chromium/files/chromium-137-compiler.patch +++ b/www-client/chromium/files/chromium-137-compiler.patch @@ -1,8 +1,8 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 0aa2d1e5c8..2f3ac56cb4 100644 +index 0aa2d1e5c8..88a7a2eb96 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -307,9 +307,6 @@ config("compiler") { +@@ -307,12 +307,8 @@ config("compiler") { configs += [ # See the definitions below. @@ -11,8 +11,11 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 - ":compiler_cpu_abi", ":compiler_codegen", ":compiler_deterministic", - ":clang_warning_suppression", -@@ -492,6 +489,9 @@ config("compiler") { +- ":clang_warning_suppression", + ] + + # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr +@@ -492,6 +488,9 @@ config("compiler") { ldflags += [ "-fPIC" ] rustflags += [ "-Crelocation-model=pic" ] @@ -22,7 +25,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 if (!is_clang) { # Use pipes for communicating between sub-processes. Faster. # (This flag doesn't do anything with Clang.) -@@ -567,62 +567,6 @@ config("compiler") { +@@ -567,62 +566,6 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } @@ -85,7 +88,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 # C11/C++11 compiler flags setup. # --------------------------- if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || -@@ -1033,20 +977,6 @@ config("compiler") { +@@ -1033,20 +976,6 @@ config("compiler") { # `-nodefaultlibs` from the linker invocation from Rust, which would be used # to compile dylibs on Android, such as for constructing unit test APKs. "-Cdefault-linker-libraries", @@ -106,7 +109,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 ] if (!is_win || force_rustc_color_output) { -@@ -1095,7 +1025,7 @@ config("compiler") { +@@ -1095,7 +1024,7 @@ config("compiler") { # Don't allow unstable features to be enabled by `#![feature()]` without # additional command line flags. config("disallow_unstable_features") { @@ -115,7 +118,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 } config("libcxx_hardening") { -@@ -1554,52 +1484,6 @@ config("compiler_deterministic") { +@@ -1554,52 +1483,6 @@ config("compiler_deterministic") { } } @@ -168,7 +171,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 # Tells the compiler not to use absolute paths when passing the default # paths to the tools it invokes. We don't want this because we don't # really need it and it can mess up the RBE cache entries. -@@ -1618,28 +1502,6 @@ config("compiler_deterministic") { +@@ -1618,65 +1501,6 @@ config("compiler_deterministic") { } } @@ -194,13 +197,31 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 - } -} - - # Controls the usage of a warning suppression mapping (WSM) file to suppress - # warnings based on the path of the file they come from. It's controlled by the - # `clang_warning_suppression_file` gn argument , which points to a text file -@@ -1665,18 +1527,6 @@ config("clang_warning_suppression") { - } - } - +-# Controls the usage of a warning suppression mapping (WSM) file to suppress +-# warnings based on the path of the file they come from. It's controlled by the +-# `clang_warning_suppression_file` gn argument , which points to a text file +-# defining which warnings should be suppressed where. +-# See //build/config/warning_suppression.txt for an example file; this is the +-# file used by Chromium. +-# +-# To use a different file, or to use this functionality outside of chromium, +-# set the `clang_warning_suppression_file` argument to point to the new file, +-# e.g. by setting in the the project's .gn file. +-config("clang_warning_suppression") { +- # Some build configs use older versions of clang that don't support WSMs +- if (!is_nacl && default_toolchain != "//build/toolchain/cros:target" && +- !llvm_android_mainline && is_clang && +- clang_warning_suppression_file != "") { +- from_build_root = +- rebase_path(clang_warning_suppression_file, root_build_dir) +- inputs = [ clang_warning_suppression_file ] +- cflags = [ +- "-Xclang", +- "--warning-suppression-mappings=" + from_build_root, +- ] +- } +-} +- -config("rustc_revision") { - if (rustc_revision != "") { - # Similar to the above config, this is here so that all files get recompiled @@ -216,7 +237,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 config("compiler_arm_fpu") { if (current_cpu == "arm" && !is_ios && !is_nacl) { cflags = [ "-mfpu=$arm_fpu" ] -@@ -2116,11 +1966,7 @@ config("chromium_code") { +@@ -2116,11 +1940,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { @@ -229,7 +250,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. -@@ -2129,24 +1975,6 @@ config("chromium_code") { +@@ -2129,24 +1949,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] @@ -254,7 +275,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 if (is_apple) { cflags_objc = [ "-Wimplicit-retain-self" ] cflags_objcc = [ "-Wimplicit-retain-self" ] -@@ -2566,7 +2394,8 @@ config("default_stack_frames") { +@@ -2566,7 +2368,8 @@ config("default_stack_frames") { # [0]: https://pinpoint-dot-chromeperf.appspot.com/job/147634a8be0000 # [1]: https://pinpoint-dot-chromeperf.appspot.com/job/132bc772be0000 # [2]: https://crrev.com/c/5447532 @@ -264,7 +285,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 if (is_win) { # clang-cl's /O2 corresponds to clang's -O3, and really want -O2 for # consistency with the other platforms. -@@ -2615,7 +2444,8 @@ config("optimize") { +@@ -2615,7 +2418,8 @@ config("optimize") { } # Turn off optimizations. @@ -274,7 +295,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2650,7 +2480,8 @@ config("no_optimize") { +@@ -2650,7 +2454,8 @@ config("no_optimize") { # Turns up the optimization level. Used to explicitly enable -O2 instead of # -Os for select targets on platforms that use optimize_for_size. No-op # elsewhere. @@ -284,7 +305,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2683,7 +2514,8 @@ config("optimize_max") { +@@ -2683,7 +2488,8 @@ config("optimize_max") { # # TODO(crbug.com/41259697) - rework how all of these configs are related # so that we don't need this disclaimer. @@ -294,7 +315,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2712,7 +2544,8 @@ config("optimize_speed") { +@@ -2712,7 +2518,8 @@ config("optimize_speed") { } } @@ -304,7 +325,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 cflags = [ "-O1" ] + common_optimize_on_cflags rustflags = [ "-Copt-level=1" ] ldflags = common_optimize_on_ldflags -@@ -2843,7 +2676,8 @@ config("win_pdbaltpath") { +@@ -2843,7 +2650,8 @@ config("win_pdbaltpath") { } # Full symbols. @@ -314,7 +335,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 rustflags = [] configs = [] if (is_win) { -@@ -3005,7 +2839,8 @@ config("symbols") { +@@ -3005,7 +2813,8 @@ config("symbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. @@ -324,7 +345,7 @@ index 0aa2d1e5c8..2f3ac56cb4 100644 rustflags = [] if (is_win) { # Functions, files, and line tables only. -@@ -3090,7 +2925,8 @@ config("minimal_symbols") { +@@ -3090,7 +2899,8 @@ config("minimal_symbols") { # This configuration contains function names only. That is, the compiler is # told to not generate debug information and the linker then just puts function # names in the final debug information. |