diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index ce497bfa501..75e05f1ddd4 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -184,8 +184,8 @@ def configure(env: "SConsEnvironment"): # LTO - if env["lto"] == "auto": # Full LTO for production. - env["lto"] = "full" + if env["lto"] == "auto": # Enable LTO for production. + env["lto"] = "thin" if env["use_llvm"] else "full" if env["lto"] != "none": if env["lto"] == "thin": diff --git a/platform/web/detect.py b/platform/web/detect.py index 0620c93f491..87315a405f2 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -117,8 +117,8 @@ def configure(env: "SConsEnvironment"): # LTO - if env["lto"] == "auto": # Full LTO for production. - env["lto"] = "full" + if env["lto"] == "auto": # Enable LTO for production. + env["lto"] = "thin" if env["lto"] != "none": if env["lto"] == "thin": diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 5893858dd9e..943de74a3e9 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -762,8 +762,8 @@ def configure_mingw(env: "SConsEnvironment"): ## LTO - if env["lto"] == "auto": # Full LTO for production with MinGW. - env["lto"] = "full" + if env["lto"] == "auto": # Enable LTO for production with MinGW. + env["lto"] = "thin" if env["use_llvm"] else "full" if env["lto"] != "none": if env["lto"] == "thin":