increase minapi, remove armv7 (32-bit arm),
link to arm64 by default and use new-style linker flags
This commit is contained in:
parent
1d85617b76
commit
b35556b379
4 changed files with 25 additions and 19 deletions
|
@ -11,7 +11,7 @@ class LibffiRecipe(Recipe):
|
|||
include_per_arch = True
|
||||
include_dir = "build_{arch.sdk}-{arch.arch}/include"
|
||||
include_name = "ffi"
|
||||
archs = ["x86_64", "armv7", "arm64"]
|
||||
archs = ["x86_64", "arm64"]
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
if self.has_marker("patched"):
|
||||
|
|
30
toolchain.py
30
toolchain.py
|
@ -226,35 +226,35 @@ class Arch(object):
|
|||
|
||||
|
||||
|
||||
class ArchSimulator(Arch):
|
||||
sdk = "iphonesimulator"
|
||||
arch = "i386"
|
||||
triple = "i386-apple-darwin11"
|
||||
version_min = "-miphoneos-version-min=6.0.0"
|
||||
sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip()
|
||||
#class ArchSimulator(Arch):
|
||||
# sdk = "iphonesimulator"
|
||||
# arch = "i386"
|
||||
# triple = "i386-apple-darwin11"
|
||||
# version_min = "-miphoneos-version-min=6.0.0"
|
||||
# sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip()
|
||||
|
||||
|
||||
class Arch64Simulator(Arch):
|
||||
sdk = "iphonesimulator"
|
||||
arch = "x86_64"
|
||||
triple = "x86_64-apple-darwin13"
|
||||
version_min = "-miphoneos-version-min=7.0"
|
||||
version_min = "-miphoneos-version-min=8.0"
|
||||
sysroot = sh.xcrun("--sdk", "iphonesimulator", "--show-sdk-path").strip()
|
||||
|
||||
|
||||
class ArchIOS(Arch):
|
||||
sdk = "iphoneos"
|
||||
arch = "armv7"
|
||||
triple = "arm-apple-darwin11"
|
||||
version_min = "-miphoneos-version-min=6.0.0"
|
||||
sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip()
|
||||
#class ArchIOS(Arch):
|
||||
# sdk = "iphoneos"
|
||||
# arch = "armv7"
|
||||
# triple = "arm-apple-darwin11"
|
||||
# version_min = "-miphoneos-version-min=6.0.0"
|
||||
# sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip()
|
||||
|
||||
|
||||
class Arch64IOS(Arch):
|
||||
sdk = "iphoneos"
|
||||
arch = "arm64"
|
||||
triple = "aarch64-apple-darwin13"
|
||||
version_min = "-miphoneos-version-min=7.0"
|
||||
version_min = "-miphoneos-version-min=8.0"
|
||||
sysroot = sh.xcrun("--sdk", "iphoneos", "--show-sdk-path").strip()
|
||||
|
||||
|
||||
|
@ -359,7 +359,7 @@ class Context(object):
|
|||
self.archs = (
|
||||
# ArchSimulator(self),
|
||||
Arch64Simulator(self),
|
||||
ArchIOS(self),
|
||||
# ArchIOS(self),
|
||||
Arch64IOS(self))
|
||||
|
||||
# path to some tools
|
||||
|
|
|
@ -20,5 +20,5 @@ for fn in sofiles:
|
|||
unique_args = ' '.join(x for x in sorted(set(args)) if x.endswith('.so.o'))
|
||||
print('Biglink create %s library' % sys.argv[1])
|
||||
cmd = "ar -q %s %s" % (sys.argv[1], unique_args)
|
||||
print(cmd)
|
||||
print('Binlinking: {}'.format(cmd))
|
||||
subprocess.Popen(cmd, shell=True).communicate()
|
||||
|
|
|
@ -75,5 +75,11 @@ f.close()
|
|||
|
||||
print('Liblink redirect linking with', objects)
|
||||
ld = environ.get('ARM_LD')
|
||||
arch = environ.get('ARCH', 'armv7')
|
||||
subprocess.call([ld, '-r', '-o', output + '.o', '-ios_version_min', '7.0', '-arch', arch] + objects)
|
||||
arch = environ.get('ARCH', 'arm64')
|
||||
if 'arm' in arch:
|
||||
min_version_flag = '-ios_version_min'
|
||||
else:
|
||||
min_version_flag = '-ios_simulator_version_min'
|
||||
call = [ld, '-r', '-o', output + '.o', min_version_flag, '8.0', '-arch', arch] + objects
|
||||
print("Linking: {}".format(" ".join(call)))
|
||||
subprocess.call(call)
|
||||
|
|
Loading…
Reference in a new issue