Bug 1257051 - Use separate target triplets for iOS and OSX. r=ted

This aligns with the triplets used by clang/llvm. Technically, this
won't break iOS builds still using -darwin triplets until we move
MOZ_IOS_SDK to moz.configure and actively reject non iOS targets with
the iOS sdk.

Also allow to distinguish iOS and OSX with target.os.
This commit is contained in:
Mike Hommey 2016-03-16 08:23:31 +09:00
Родитель 26e520518f
Коммит b9c63e7503
2 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -360,7 +360,11 @@ def split_triplet(triplet):
elif os.startswith('mingw'):
canonical_os = canonical_kernel = 'WINNT'
elif os.startswith('darwin'):
canonical_os = canonical_kernel = 'Darwin'
canonical_kernel = 'Darwin'
canonical_os = 'OSX'
elif os.startswith('ios'):
canonical_kernel = 'Darwin'
canonical_os = 'iOS'
elif os.startswith('dragonfly'):
canonical_os = canonical_kernel = 'DragonFly'
elif os.startswith('freebsd'):
@ -434,7 +438,13 @@ def target(value, host):
def host_and_target_for_old_configure(host, target):
# Autoconf needs these set
add_old_configure_arg('--host=%s' % host.alias)
add_old_configure_arg('--target=%s' % target.alias)
target_alias = target.alias
# old-configure does plenty of tests against $target and $target_os
# and expects darwin for iOS, so make it happy.
if target.os == 'iOS':
target_alias = target_alias.replace('-ios', '-darwin')
add_old_configure_arg('--target=%s' % target_alias)
# These variables are for compatibility with the current moz.builds and
@ -444,7 +454,8 @@ def target_variables(target):
if target.kernel == 'kFreeBSD':
os_target = 'GNU/kFreeBSD'
os_arch = 'GNU_kFreeBSD'
elif target.kernel == 'Linux' and target.os == 'GNU':
elif target.kernel == 'Darwin' or (target.kernel == 'Linux' and
target.os == 'GNU'):
os_target = target.kernel
os_arch = target.kernel
else:

Просмотреть файл

@ -121,7 +121,7 @@ check_prog('ZIP', ('zip',))
@depends(target)
def mac_programs(target):
if target.os == 'Darwin':
if target.kernel == 'Darwin':
check_prog('DSYMUTIL', ('dsymutil', 'llvm-dsymutil'), allow_missing=True)
check_prog('GENISOIMAGE', ('genisoimage',), allow_missing=True)