From 4b5ba6aadc4c9f560c7893782d78ff522ea4dc04 Mon Sep 17 00:00:00 2001 From: Alexander Frick Date: Thu, 2 Mar 2023 08:10:34 -0600 Subject: [PATCH] fix AVX2 part2 --- other/AVX2/build/config/compiler/BUILD.gn | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/other/AVX2/build/config/compiler/BUILD.gn b/other/AVX2/build/config/compiler/BUILD.gn index 13cbce5d..eca001aa 100644 --- a/other/AVX2/build/config/compiler/BUILD.gn +++ b/other/AVX2/build/config/compiler/BUILD.gn @@ -903,12 +903,13 @@ config("compiler") { # building with ThinLTO, no optimization is performed in the link step. config("thinlto_optimize_default") { if (!is_debug && use_thin_lto && is_a_target_toolchain) { - lto_opt_level = 3 if (is_win) { - ldflags = [ "/opt:lldlto=2" ] + lto_opt_level = 2 + ldflags = [ "/opt:lldlto=" + lto_opt_level ] ldflags += [ "-mllvm:-enable-pre=false", ] } else { + lto_opt_level = 3 ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } } @@ -924,16 +925,13 @@ config("thinlto_optimize_default") { # use it on important targets such as the main browser executable or dll. config("thinlto_optimize_max") { if (!is_debug && use_thin_lto && is_a_target_toolchain) { - if (thin_lto_enable_optimizations) { - lto_opt_level = 3 - } else { - lto_opt_level = 3 - } if (is_win) { - ldflags = [ "/opt:lldlto=2" ] + lto_opt_level = 2 + ldflags = [ "/opt:lldlto=" + lto_opt_level ] ldflags += [ "-mllvm:-enable-pre=false", ] } else { + lto_opt_level = 3 ldflags = [ "-Wl,--lto-O" + lto_opt_level ] } }