More complete iphone_sim target support.
This commit is contained in:
committed by
alexander-gorshenev
parent
00aba8a08d
commit
e895c0939c
+10
@@ -67,6 +67,14 @@ internal class IPhoneOSfromMacOSPlatform(distribution: Distribution)
|
||||
override val targetSysRoot = "${distribution.dependencies}/${properties.propertyString("targetSysRoot.osx-ios")!!}"
|
||||
}
|
||||
|
||||
internal class IPhoneSimulatorFromMacOSPlatform(distribution: Distribution)
|
||||
: MacOSPlatform(distribution) {
|
||||
|
||||
override val arch = properties.propertyString("arch.osx-ios-sim")!!
|
||||
override val osVersionMin = properties.propertyList("osVersionMin.osx-ios-sim")
|
||||
override val llvmLlcFlags = properties.propertyList("llvmLlcFlags.osx-ios-sim")
|
||||
override val targetSysRoot = "${distribution.dependencies}/${properties.propertyString("targetSysRoot.osx-ios-sim")!!}"
|
||||
}
|
||||
internal class LinuxPlatform(distribution: Distribution)
|
||||
: PlatformFlags(distribution) {
|
||||
|
||||
@@ -121,6 +129,8 @@ internal class LinkStage(val context: Context) {
|
||||
val platform: PlatformFlags = when (TargetManager.host) {
|
||||
KonanTarget.LINUX -> LinuxPlatform(distribution)
|
||||
KonanTarget.MACBOOK -> when (targetManager.current) {
|
||||
KonanTarget.IPHONE_SIM
|
||||
-> IPhoneSimulatorFromMacOSPlatform(distribution)
|
||||
KonanTarget.IPHONE
|
||||
-> IPhoneOSfromMacOSPlatform(distribution)
|
||||
KonanTarget.MACBOOK
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
// TODO: utilize substitution mechanism from interop.
|
||||
|
||||
// macbook
|
||||
arch.osx = x86_64
|
||||
sysRoot.osx = target-sysroot-1-darwin-macos
|
||||
llvmHome.osx = clang+llvm-3.8.0-darwin-macos
|
||||
@@ -10,6 +11,7 @@ linkerKonanFlags.osx = -lc++
|
||||
linkerOptimizationFlags.osx = -dead_strip
|
||||
osVersionMin.osx = -macosx_version_min 10.10.0
|
||||
|
||||
// iphone
|
||||
arch.osx-ios = arm64
|
||||
sysRoot.osx-ios = target-sysroot-1-darwin-macos
|
||||
targetSysRoot.osx-ios = target-sysroot-1-darwin-ios
|
||||
@@ -20,6 +22,18 @@ linkerKonanFlags.osx-ios = -lc++
|
||||
linkerOptimizationFlags.osx-ios = -dead_strip
|
||||
osVersionMin.osx-ios = -iphoneos_version_min 5.0.0
|
||||
|
||||
// iphone_sim
|
||||
arch.osx-ios-sim = x86_64
|
||||
sysRoot.osx-ios-sim = target-sysroot-1-darwin-macos
|
||||
targetSysRoot.osx-ios-sim = target-sysroot-1-darwin-ios-sim
|
||||
llvmHome.osx-ios-sim = clang+llvm-3.8.0-darwin-macos
|
||||
llvmLtoFlags.osx-ios-sim = -O3 -function-sections -exported-symbol=_main
|
||||
llvmLlcFlags.osx-ios-sim = -mtriple=x86_64-apple-ios5.0.0
|
||||
linkerKonanFlags.osx-ios-sim = -lc++
|
||||
linkerOptimizationFlags.osx-ios-sim = -dead_strip
|
||||
osVersionMin.osx-ios-sim = -ios_simulator_version_min 5.0.0
|
||||
|
||||
// linux
|
||||
sysRoot.linux = target-gcc-toolchain-3-linux-x86-64/x86_64-unknown-linux-gnu/sysroot
|
||||
llvmHome.linux = clang+llvm-3.8.0-linux-x86-64
|
||||
libGcc.linux = target-gcc-toolchain-3-linux-x86-64/lib/gcc/x86_64-unknown-linux-gnu/4.8.5
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ allprojects {
|
||||
"iphone":
|
||||
["-stdlib=libc++", "-arch", "arm64", "-isysroot", "$iphoneSysrootDir"],
|
||||
"iphone_sim":
|
||||
["-stdlib=libc++"]
|
||||
["-stdlib=libc++", "-isysroot", "$iphoneSimSysrootDir"],
|
||||
]
|
||||
}
|
||||
ext.targetList = ext.targetArgs.keySet() as List
|
||||
|
||||
Vendored
+3
@@ -89,6 +89,9 @@ if (isLinux()) {
|
||||
task iphoneSysroot(type: TgzNativeDep) {
|
||||
baseName = "target-sysroot-1-darwin-ios"
|
||||
}
|
||||
task iphoneSimSysroot(type: TgzNativeDep) {
|
||||
baseName = "target-sysroot-1-darwin-ios-sim"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user