diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-20 09:45:33 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-20 09:45:33 +0200 |
commit | aa553f403099a31520ab0c75a43f352642170d5f (patch) | |
tree | bdc0939e0877c56efa73473e43d262ed96e6cea9 /platform/windows/detect.py | |
parent | 7da532275bdddce4bfcb871bd6ded8fe2163b341 (diff) | |
parent | 35a15e619161798820b2bd6ff46178c5b7ccebcf (diff) | |
download | redot-engine-aa553f403099a31520ab0c75a43f352642170d5f.tar.gz |
Merge pull request #65745 from akien-mga/scons-production-lto-earlier
Refactor handling of `production` flag and per-platform LTO defaults
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r-- | platform/windows/detect.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index e6e1874fc0..52a959b34a 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -448,6 +448,9 @@ def configure_msvc(env, vcvars_msvc_config): ## LTO + if env["lto"] == "auto": # No LTO by default for MSVC, doesn't help. + env["lto"] = "none" + if env["lto"] != "none": if env["lto"] == "thin": print("ThinLTO is only compatible with LLVM, use `use_llvm=yes` or `lto=full`.") @@ -564,6 +567,11 @@ def configure_mingw(env): if try_cmd("gcc-ranlib --version", env["mingw_prefix"], env["arch"]): env["RANLIB"] = mingw_bin_prefix + "gcc-ranlib" + ## LTO + + if env["lto"] == "auto": # Full LTO for production with MinGW. + env["lto"] = "full" + if env["lto"] != "none": if env["lto"] == "thin": if not env["use_llvm"]: |