aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorcomex2015-07-17 00:19:39 -0400
committercomex2015-07-17 16:26:42 -0400
commit66b27e898d8491a2c820d40ee6e0fe5c8e222e0f (patch)
tree2f5d573e9ea7e1c0c5085611226ed978cfbc95d3 /configure
parentupdate readme for fixed and maybe-fixed issues (diff)
downloadsubstitute-66b27e898d8491a2c820d40ee6e0fe5c8e222e0f.tar.gz
add more correct 'is iOS' heuristic, and use it
fixes missing -miphoneos-version-min=8.0
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 6 insertions, 3 deletions
diff --git a/configure b/configure
index 116faf0..2c5e06d 100755
--- a/configure
+++ b/configure
@@ -13,8 +13,8 @@ c.dsymutil.required()
settings.add_setting_option('imaon2', '--with-imaon2', 'path to imaon2 (optional)', '')
settings.add_setting_option('gen_dia', '--enable-recompile-dia', 'generate darwin-inject-asm.S', False, bool=True)
settings.add_setting_option('enable_tests', '--enable-tests', 'tests!', False, bool=True)
-settings.add_setting_option('enable_ios_bootstrap', '--enable-ios-bootstrap', 'default: true if you pass --xcode-sdk=iphone*',
- lambda: 'iphone' in str(settings.host_machine().toolchains()[0].sdk_opt.value),
+settings.add_setting_option('enable_ios_bootstrap', '--enable-ios-bootstrap', 'default: true if targeting iOS',
+ lambda: settings.host_machine().is_ios(),
bool=True)
settings.add_setting_option('enable_werror', '--enable-werror', '', False, bool=True)
@@ -44,6 +44,9 @@ for name, cflags in asm_archs:
mach_settings.ldflags = asm_ldflags + mach_settings.ldflags
mconfig.post_parse_args_will_need.append(f)
+def wrong_ios():
+ if settings.enable_ios_bootstrap and not settings.host_machine().is_ios():
+ raise mconfig.DependencyNotFoundException("iOS bootstrap requires iOS, but the target doesn't seem to be iOS - if you're compiling without Xcode, please specify --target=armv7-apple-darwin10 or something like that")
mconfig.parse_args()
####################################
@@ -58,7 +61,7 @@ if settings.enable_werror:
# XXX this is a mess and wrong
flags = ['-O3']
-if settings.host_machine().is_cross():
+if settings.host_machine().is_ios():
flags.append('-miphoneos-version-min=8.0')
for i in ('cflags', 'ldflags'):
settings.host[i] = flags + settings.host[i]