summaryrefslogtreecommitdiff
path: root/platform/ios
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-20 09:45:33 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-20 09:45:33 +0200
commitaa553f403099a31520ab0c75a43f352642170d5f (patch)
treebdc0939e0877c56efa73473e43d262ed96e6cea9 /platform/ios
parent7da532275bdddce4bfcb871bd6ded8fe2163b341 (diff)
parent35a15e619161798820b2bd6ff46178c5b7ccebcf (diff)
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/ios')
-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"])