summaryrefslogtreecommitdiff
path: root/platform/ios/detect.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-13 17:01:47 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-19 18:11:29 +0200
commit35a15e619161798820b2bd6ff46178c5b7ccebcf (patch)
treec22c80afb7f82aeaabca3c43cb6e8ff7a7c1cd05 /platform/ios/detect.py
parent6f5704d86f95171ba8b6b2ac9f56e284c4d35d7a (diff)
SCons: Refactor handling of `production` flag and per-platform LTO defaults
Fixup to #63288. See #65583 for the bug report. Co-authored-by: Cyberrebell <chainsaw75@web.de>
Diffstat (limited to 'platform/ios/detect.py')
-rw-r--r--platform/ios/detect.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/platform/ios/detect.py b/platform/ios/detect.py
index ed7e714c4e..d5e6ee4b46 100644
--- a/platform/ios/detect.py
+++ b/platform/ios/detect.py
@@ -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"])