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:
commit
aa553f4030
7 changed files with 65 additions and 47 deletions
|
|
@ -39,9 +39,6 @@ def get_flags():
|
|||
("arch", "arm64"), # Default for convenience.
|
||||
("tools", False),
|
||||
("use_volk", False),
|
||||
# Disable by default even if production is set, as it makes linking in Xcode
|
||||
# on exports very slow and that's not what most users expect.
|
||||
("lto", "none"),
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -73,7 +70,11 @@ def configure(env):
|
|||
env.Append(CCFLAGS=["-gdwarf-2", "-O0"])
|
||||
env.Append(CPPDEFINES=["_DEBUG", ("DEBUG", 1)])
|
||||
|
||||
# LTO
|
||||
## LTO
|
||||
|
||||
if env["lto"] == "auto": # Disable by default as it makes linking in Xcode very slow.
|
||||
env["lto"] = "none"
|
||||
|
||||
if env["lto"] != "none":
|
||||
if env["lto"] == "thin":
|
||||
env.Append(CCFLAGS=["-flto=thin"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue