diff --git a/build_win.sh b/build_win.sh index 08667674..e4489ba0 100755 --- a/build_win.sh +++ b/build_win.sh @@ -47,7 +47,7 @@ cd ${CR_SRC_DIR} && # For restoring individual build targets for customization #autoninja -C out/thorium thorium chromedriver clear_key_cdm thorium_shell policy_templates pack_policy_templates setup mini_installer -j$@ && autoninja -C out/thorium thorium_all -j$@ && -autoninja -C out/thorium thorium_all setup mini_installer -j$@ && +autoninja -C out/thorium setup mini_installer -j$@ && mv -v -f ${CR_SRC_DIR}/out/thorium/mini_installer.exe ${CR_SRC_DIR}/out/thorium/thorium_mini_installer.exe && diff --git a/src/build/config/compiler_opt.gni b/src/build/config/compiler_opt.gni index 2f4c5864..80208b2d 100644 --- a/src/build/config/compiler_opt.gni +++ b/src/build/config/compiler_opt.gni @@ -33,7 +33,7 @@ declare_args() { # Only applicable to 32 Bit Windows and Linux builds, where # setting it to false allows making an SSE2 build. (`-mmmx -msse2`) # `-msse3` - use_sse3 = true + use_sse3 = current_cpu == "x86" || current_cpu == "x64" # SSE4.1 # Normal PrimoBrowser baseline @@ -89,15 +89,16 @@ declare_args() { use_fma = use_avx2 } -if (current_cpu == "arm" || current_cpu == "arm64") { - use_sse3 = false -} - if (is_debug) { assert(!use_polly, "use_polly only works with non-debug builds") assert(!use_bolt, "use_bolt only works with non-debug builds") } +# Make sure we are a x86 arch +if (use_sse3 || use_sse41 || use_sse42 || use_avx || use_avx2 || use_avx512) { + assert(current_cpu != "arm" && current_cpu != "arm64", "x86 SIMD intrinsic optimizations cannot be used with ARM targets.") +} + # 32 Bit OSes cant use anything above SSE4.2, and 32 Bit Apps can't benefit # from anything higher usually. if (use_avx || use_avx2 || use_fma) { diff --git a/src/build/config/win/BUILD.gn b/src/build/config/win/BUILD.gn index 13d7415c..2c8bca8c 100644 --- a/src/build/config/win/BUILD.gn +++ b/src/build/config/win/BUILD.gn @@ -132,9 +132,13 @@ config("compiler") { cflags += [ "-mmmx", "-msse2", - "/clang:-O3", - "-Xclang", "-O3", ] + if (is_official_build) { + cflags += [ + "/clang:-O3", + "-Xclang", "-O3", + ] + } if (use_sse3) { cflags += [ "-msse3", @@ -235,7 +239,9 @@ config("compiler") { # Don't look for libpaths in %LIB%, similar to /X in cflags above. ldflags += [ "/lldignoreenv" ] - ldflags += [ "/opt:lldlto=3", ] + if (is_official_build) { + ldflags += [ "/opt:lldlto=3", ] + } } # Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size