diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-30 12:28:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 12:28:50 +0200 |
commit | f47979f0874b2ca6134e71575fbb359c6cc5ced0 (patch) | |
tree | c5c2159d3317f1da839e390281d6f32eb82e1158 /platform/ios | |
parent | 67961d875d518b565bc1fa923772af56fb227063 (diff) | |
parent | 39facb35a021f9301f742732fbbd3c6a5a548893 (diff) |
Merge pull request #66242 from akien-mga/scons-unify-tools-target
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/detect.py | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 0f277d6b3a..74561e9fc5 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -37,7 +37,7 @@ def get_opts(): def get_flags(): return [ ("arch", "arm64"), # Default for convenience. - ("tools", False), + ("target", "template_debug"), ("use_volk", False), ] @@ -52,23 +52,6 @@ def configure(env): ) sys.exit() - ## Build type - - if env["target"].startswith("release"): - env.Append(CPPDEFINES=[("NS_BLOCK_ASSERTIONS", 1)]) - if env["optimize"] == "speed": # optimize for speed (default) - # `-O2` is more friendly to debuggers than `-O3`, leading to better crash backtraces - # when using `target=release_debug`. - opt = "-O3" if env["target"] == "release" else "-O2" - env.Append(CCFLAGS=[opt]) - env.Append(LINKFLAGS=[opt]) - elif env["optimize"] == "size": # optimize for size - env.Append(CCFLAGS=["-Os"]) - env.Append(LINKFLAGS=["-Os"]) - - elif env["target"] == "debug": - env.Append(CCFLAGS=["-g", "-O0"]) - ## LTO if env["lto"] == "auto": # Disable by default as it makes linking in Xcode very slow. @@ -145,12 +128,10 @@ def configure(env): env.Append(ASFLAGS=["-arch", "arm64"]) env.Append(CPPDEFINES=["NEED_LONG_INT"]) - # Disable exceptions on non-tools (template) builds - if not env["tools"]: - if env["ios_exceptions"]: - env.Append(CCFLAGS=["-fexceptions"]) - else: - env.Append(CCFLAGS=["-fno-exceptions"]) + if env["ios_exceptions"]: + env.Append(CCFLAGS=["-fexceptions"]) + else: + env.Append(CCFLAGS=["-fno-exceptions"]) # Temp fix for ABS/MAX/MIN macros in iOS SDK blocking compilation env.Append(CCFLAGS=["-Wno-ambiguous-macro"]) |