mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
more cross-arch build.ps1 android fixes
This commit is contained in:
24
cmake/caches/Runtime-Android-i686.cmake
Normal file
24
cmake/caches/Runtime-Android-i686.cmake
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
set(SWIFT_HOST_VARIANT_SDK ANDROID CACHE STRING "")
|
||||
set(SWIFT_HOST_VARIANT_ARCH i686 CACHE STRING "")
|
||||
|
||||
# NOTE(compnerd) disable the tools, we are trying to build just the standard
|
||||
# library.
|
||||
set(SWIFT_INCLUDE_TOOLS NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) cannot build tests since the tests require the toolchain
|
||||
set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) cannot build docs since that requires perl
|
||||
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) these are part of the toolchain, not the runtime.
|
||||
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) build with the compiler specified, not a just built compiler.
|
||||
set(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER YES CACHE BOOL "")
|
||||
|
||||
set(SWIFT_SDK_ANDROID_ARCHITECTURES i686 CACHE STRING "")
|
||||
|
||||
# NOTE(compnerd) this is lollipop, which seems to still have decent usage.
|
||||
set(SWIFT_ANDROID_API_LEVEL 21 CACHE STRING "")
|
||||
24
cmake/caches/Runtime-Android-x86_64.cmake
Normal file
24
cmake/caches/Runtime-Android-x86_64.cmake
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
set(SWIFT_HOST_VARIANT_SDK ANDROID CACHE STRING "")
|
||||
set(SWIFT_HOST_VARIANT_ARCH x86_64 CACHE STRING "")
|
||||
|
||||
# NOTE(compnerd) disable the tools, we are trying to build just the standard
|
||||
# library.
|
||||
set(SWIFT_INCLUDE_TOOLS NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) cannot build tests since the tests require the toolchain
|
||||
set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) cannot build docs since that requires perl
|
||||
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) these are part of the toolchain, not the runtime.
|
||||
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")
|
||||
|
||||
# NOTE(compnerd) build with the compiler specified, not a just built compiler.
|
||||
set(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER YES CACHE BOOL "")
|
||||
|
||||
set(SWIFT_SDK_ANDROID_ARCHITECTURES x86_64 CACHE STRING "")
|
||||
|
||||
# NOTE(compnerd) this is lollipop, which seems to still have decent usage.
|
||||
set(SWIFT_ANDROID_API_LEVEL 21 CACHE STRING "")
|
||||
@@ -250,7 +250,7 @@ $AndroidARMv7 = @{
|
||||
BinaryDir = "bina";
|
||||
CMakeName = "armv7-a";
|
||||
LLVMName = "armv7";
|
||||
LLVMTarget = "armv7a-unknown-linux-androideabi";
|
||||
LLVMTarget = "armv7-unknown-linux-androideabi$AndroidAPILevel";
|
||||
BuildID = 500;
|
||||
BinaryCache = "$BinaryCache\armv7";
|
||||
PlatformInstallRoot = "$BinaryCache\armv7\Android.platform";
|
||||
@@ -263,7 +263,7 @@ $AndroidX86 = @{
|
||||
BinaryDir = "bin";
|
||||
CMakeName = "i686";
|
||||
LLVMName = "i686";
|
||||
LLVMTarget = "i686-unknown-linux-android";
|
||||
LLVMTarget = "i686-unknown-linux-android$AndroidAPILevel";
|
||||
BuildID = 600;
|
||||
BinaryCache = "$BinaryCache\i686";
|
||||
PlatformInstallRoot = "$BinaryCache\x86\Android.platform";
|
||||
@@ -276,7 +276,7 @@ $AndroidX64 = @{
|
||||
BinaryDir = "bin64";
|
||||
CMakeName = "x86_64";
|
||||
LLVMName = "x86_64";
|
||||
LLVMTarget = "x86_64-unknown-linux-android";
|
||||
LLVMTarget = "x86_64-unknown-linux-android$AndroidAPILevel";
|
||||
BuildID = 700;
|
||||
BinaryCache = "$BinaryCache\x86_64";
|
||||
PlatformInstallRoot = "$BinaryCache\x64\Android.platform";
|
||||
@@ -1630,7 +1630,7 @@ function Build-Foundation([Platform]$Platform, $Arch, [switch]$Test = $false) {
|
||||
-UseBuiltCompilers ASM,C,Swift `
|
||||
-BuildTargets $Targets `
|
||||
-Defines (@{
|
||||
BUILD_TOOLS = if ($Platform -eq "Windows") { "YES" } else { "NO" };
|
||||
FOUNDATION_BUILD_TOOLS = if ($Platform -eq "Windows") { "YES" } else { "NO" };
|
||||
CMAKE_SYSTEM_NAME = $Platform.ToString();
|
||||
# Turn off safeseh for lld as it has safeseh enabled by default
|
||||
# and fails with an ICU data object file icudt69l_dat.obj. This
|
||||
|
||||
Reference in New Issue
Block a user