diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-08 11:24:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 11:24:43 +0200 |
commit | 8b79a19426c7f5eab04caa573866276c76c70871 (patch) | |
tree | 3c93bbc143612aa2d5487b9c0918b74629bdd714 /platform/ios | |
parent | 69233093d7e6479b5130bf2c39cbf464a6809c1b (diff) | |
parent | c2c659db326591519d451d368c4e33c78bb9c1fa (diff) |
Merge pull request #63288 from akien-mga/scons-refactor-lto
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/detect.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 1a8d24d12d..3cfb25cf61 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -39,6 +39,9 @@ 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"), ] @@ -70,9 +73,14 @@ def configure(env): env.Append(CCFLAGS=["-gdwarf-2", "-O0"]) env.Append(CPPDEFINES=["_DEBUG", ("DEBUG", 1)]) - if env["use_lto"]: - env.Append(CCFLAGS=["-flto"]) - env.Append(LINKFLAGS=["-flto"]) + # LTO + if env["lto"] != "none": + if env["lto"] == "thin": + env.Append(CCFLAGS=["-flto=thin"]) + env.Append(LINKFLAGS=["-flto=thin"]) + else: + env.Append(CCFLAGS=["-flto"]) + env.Append(LINKFLAGS=["-flto"]) ## Compiler configuration |