summaryrefslogtreecommitdiff
path: root/platform/ios/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/ios/detect.py')
-rw-r--r--platform/ios/detect.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/platform/ios/detect.py b/platform/ios/detect.py
index 1a8d24d12d..d5e6ee4b46 100644
--- a/platform/ios/detect.py
+++ b/platform/ios/detect.py
@@ -70,9 +70,18 @@ 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"] == "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"])
+ env.Append(LINKFLAGS=["-flto=thin"])
+ else:
+ env.Append(CCFLAGS=["-flto"])
+ env.Append(LINKFLAGS=["-flto"])
## Compiler configuration
@@ -112,6 +121,10 @@ def configure(env):
env.Append(CCFLAGS=["-miphoneos-version-min=11.0"])
if env["arch"] == "x86_64":
+ if not env["ios_simulator"]:
+ print("ERROR: Building for iOS with 'arch=x86_64' requires 'ios_simulator=yes'.")
+ sys.exit(255)
+
env["ENV"]["MACOSX_DEPLOYMENT_TARGET"] = "10.9"
env.Append(
CCFLAGS=(