From ae66db0476a7508b581c9261944facc29d5841fe Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Wed, 8 Dec 2021 19:45:39 -0500 Subject: correctly patch compiler/BUILD.gn --- .../chromium/files/chromium-98-compiler-r1.patch | 42 +++++++++++++--------- 1 file changed, 25 insertions(+), 17 deletions(-) (limited to 'www-client') diff --git a/www-client/chromium/files/chromium-98-compiler-r1.patch b/www-client/chromium/files/chromium-98-compiler-r1.patch index 9d39d24..685638e 100644 --- a/www-client/chromium/files/chromium-98-compiler-r1.patch +++ b/www-client/chromium/files/chromium-98-compiler-r1.patch @@ -1,5 +1,5 @@ diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 8048ec5e8..bd68c4f78 100644 +index 8048ec5e8..85c58fd32 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -291,9 +291,7 @@ config("compiler") { @@ -12,7 +12,7 @@ index 8048ec5e8..bd68c4f78 100644 ":compiler_codegen", ":compiler_deterministic", ] -@@ -534,23 +532,6 @@ config("compiler") { +@@ -534,31 +532,6 @@ config("compiler") { ldflags += [ "-Wl,-z,keep-text-section-prefix" ] } @@ -33,10 +33,18 @@ index 8048ec5e8..bd68c4f78 100644 - } - } - - # TODO(crbug.com/1235145): Investigate why/if this should be needed. - if (is_win) { - cflags += [ "/clang:-ffp-contract=off" ] -@@ -1231,45 +1212,6 @@ config("compiler_deterministic") { +- # TODO(crbug.com/1235145): Investigate why/if this should be needed. +- if (is_win) { +- cflags += [ "/clang:-ffp-contract=off" ] +- } else { +- cflags += [ "-ffp-contract=off" ] +- } +- } +- + # C11/C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) || +@@ -1231,45 +1204,6 @@ config("compiler_deterministic") { } } @@ -82,7 +90,7 @@ index 8048ec5e8..bd68c4f78 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 goma cache entries. -@@ -1556,7 +1498,7 @@ config("chromium_code") { +@@ -1556,7 +1490,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { @@ -91,7 +99,7 @@ index 8048ec5e8..bd68c4f78 100644 if (treat_warnings_as_errors) { cflags += [ "-Werror" ] -@@ -1565,10 +1507,6 @@ config("chromium_code") { +@@ -1565,10 +1499,6 @@ config("chromium_code") { # well. ldflags = [ "-Werror" ] } @@ -102,7 +110,7 @@ index 8048ec5e8..bd68c4f78 100644 # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. -@@ -1577,15 +1515,6 @@ config("chromium_code") { +@@ -1577,15 +1507,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] @@ -118,7 +126,7 @@ index 8048ec5e8..bd68c4f78 100644 if (is_mac) { cflags_objc = [ "-Wobjc-missing-property-synthesis" ] cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] -@@ -1988,7 +1917,8 @@ config("default_stack_frames") { +@@ -1988,7 +1909,8 @@ config("default_stack_frames") { } # Default "optimization on" config. @@ -128,7 +136,7 @@ index 8048ec5e8..bd68c4f78 100644 if (is_win) { if (chrome_pgo_phase != 2) { # Favor size over speed, /O1 must be before the common flags. -@@ -2026,7 +1956,8 @@ config("optimize") { +@@ -2026,7 +1948,8 @@ config("optimize") { } # Turn off optimizations. @@ -138,7 +146,7 @@ index 8048ec5e8..bd68c4f78 100644 if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2066,7 +1997,8 @@ config("no_optimize") { +@@ -2066,7 +1989,8 @@ config("no_optimize") { # Turns up the optimization level. On Windows, this implies whole program # optimization and link-time code generation which is very expensive and should # be used sparingly. @@ -148,7 +156,7 @@ index 8048ec5e8..bd68c4f78 100644 if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2099,7 +2031,8 @@ config("optimize_max") { +@@ -2099,7 +2023,8 @@ config("optimize_max") { # # TODO(crbug.com/621335) - rework how all of these configs are related # so that we don't need this disclaimer. @@ -158,7 +166,7 @@ index 8048ec5e8..bd68c4f78 100644 if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2125,7 +2058,8 @@ config("optimize_speed") { +@@ -2125,7 +2050,8 @@ config("optimize_speed") { } } @@ -168,7 +176,7 @@ index 8048ec5e8..bd68c4f78 100644 cflags = [ "-O1" ] + common_optimize_on_cflags rustflags = [ "-Copt-level=1" ] ldflags = common_optimize_on_ldflags -@@ -2245,7 +2179,8 @@ config("win_pdbaltpath") { +@@ -2245,7 +2171,8 @@ config("win_pdbaltpath") { } # Full symbols. @@ -178,7 +186,7 @@ index 8048ec5e8..bd68c4f78 100644 if (is_win) { if (is_clang) { cflags = [ "/Z7" ] # Debug information in the .obj files. -@@ -2369,7 +2304,8 @@ config("symbols") { +@@ -2369,7 +2296,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. @@ -188,7 +196,7 @@ index 8048ec5e8..bd68c4f78 100644 if (is_win) { # Functions, files, and line tables only. cflags = [] -@@ -2438,7 +2374,8 @@ config("minimal_symbols") { +@@ -2438,7 +2366,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. -- cgit v1.2.3