fixes libffi for xcode 10
This commit is contained in:
parent
5a60fa58fe
commit
97a5e399bf
1 changed files with 11 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
|||
from toolchain import Recipe, shprint
|
||||
import sh
|
||||
from os.path import exists
|
||||
|
||||
|
||||
class LibffiRecipe(Recipe):
|
||||
|
@ -9,20 +10,27 @@ class LibffiRecipe(Recipe):
|
|||
library = "build/Release-{arch.sdk}/libffi.a"
|
||||
include_per_arch = True
|
||||
include_dir = "build_{arch.sdk}-{arch.arch}/include"
|
||||
archs = ["x86_64", "armv7", "arm64"]
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
if self.has_marker("patched"):
|
||||
return
|
||||
# necessary as it doesn't compile with XCode 6.0. If we use 5.1.1, the
|
||||
# compiler for i386 is not working.
|
||||
# XCode 10 minimum is 8.0 now.
|
||||
shprint(sh.sed,
|
||||
"-i.bak",
|
||||
"s/-miphoneos-version-min=5.1.1/-miphoneos-version-min=6.0/g",
|
||||
"s/-miphoneos-version-min=5.1.1/-miphoneos-version-min=8.0/g",
|
||||
"generate-darwin-source-and-headers.py")
|
||||
self.apply_patch("fix-win32-unreferenced-symbol.patch")
|
||||
self.set_marker("patched")
|
||||
|
||||
def build_arch(self, arch):
|
||||
if exists("generate-darwin-source-and-headers.py"):
|
||||
shprint(
|
||||
sh.mv,
|
||||
"generate-darwin-source-and-headers.py",
|
||||
"_generate-darwin-source-and-headers.py")
|
||||
shprint(sh.touch, "generate-darwin-source-and-headers.py")
|
||||
shprint(sh.python2, "_generate-darwin-source-and-headers.py", "--only-ios")
|
||||
shprint(sh.xcodebuild, self.ctx.concurrent_xcodebuild,
|
||||
"ONLY_ACTIVE_ARCH=NO",
|
||||
"ARCHS={}".format(arch.arch),
|
||||
|
|
Loading…
Add table
Reference in a new issue