Merge pull request #65745 from akien-mga/scons-production-lto-earlier

Refactor handling of `production` flag and per-platform LTO defaults
This commit is contained in:
Rémi Verschelde 2022-09-20 09:45:33 +02:00
commit aa553f4030
7 changed files with 65 additions and 47 deletions

View file

@ -109,6 +109,10 @@ def configure(env):
env["ENV"] = os.environ
# LTO
if env["lto"] == "auto": # Full LTO for production.
env["lto"] = "full"
if env["lto"] != "none":
if env["lto"] == "thin":
env.Append(CCFLAGS=["-flto=thin"])