From abf9f375e65e75e0f0fc57e7d05acaddcc29f59c Mon Sep 17 00:00:00 2001 From: Alexander David Frick Date: Sun, 11 Sep 2022 05:06:32 -0500 Subject: [PATCH] Update BUILD.gn --- other/SSE4/build/config/compiler/BUILD.gn | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/other/SSE4/build/config/compiler/BUILD.gn b/other/SSE4/build/config/compiler/BUILD.gn index b0cb9286..f10e84c9 100644 --- a/other/SSE4/build/config/compiler/BUILD.gn +++ b/other/SSE4/build/config/compiler/BUILD.gn @@ -550,6 +550,14 @@ config("compiler") { } else { cflags += [ "-ffp-contract=off" ] } + + if (default_toolchain != "//build/toolchain/cros:target") { + # TODO(crbug.com/1361629): Fix the compiler so this is not needed. + cflags += [ + "-mllvm", + "-simplifycfg-hoist-common-skip-limit=0", + ] + } } # Rust compiler setup (for either clang or rustc). @@ -644,8 +652,8 @@ config("compiler") { ldflags += [ "/opt:lldltojobs=all", "-mllvm:-import-instr-limit=$import_instr_limit", - "-mllvm:-import-hot-multiplier=30", - "-mllvm:-import-cold-multiplier=8", + "-mllvm:-import-hot-multiplier=15", + "-mllvm:-import-cold-multiplier=4", # "/lldltocache:" + # rebase_path("$root_out_dir/thinlto-cache", root_build_dir), # "/lldltocachepolicy:$cache_policy", @@ -900,7 +908,7 @@ config("compiler_cpu_abi") { "-O3", "-msse4", ] - ldflags += [ "-m64", "-Wl,-O3", "-msse4", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=30", "-Wl,-mllvm,-import-cold-multiplier=8", ] + ldflags += [ "-m64", "-Wl,-O3", "-msse4", "-Wl,-mllvm,-import-instr-limit=30", "-Wl,-mllvm,-import-hot-multiplier=15", "-Wl,-mllvm,-import-cold-multiplier=4", ] } else if (current_cpu == "x86") { cflags += [ "-m32" ] ldflags += [ "-m32" ] @@ -1683,7 +1691,7 @@ config("chromium_code") { } # TODO(https://crbug.com/1355871): Enable on more platforms. - if ((is_win || is_mac) && target_cpu == "x64") { + if (is_win || is_mac || is_linux || is_chromeos) { cflags += [ "-Wextra-semi" ] } }