-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[android] Get build scripts working natively, fix tests and install #29296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -460,6 +460,10 @@ function set_build_options_for_host() { | |
| SWIFT_HOST_VARIANT_ARCH=$architecture | ||
|
|
||
| case ${host} in | ||
| android-aarch64) | ||
| SWIFT_HOST_TRIPLE="aarch64-unknown-linux-android" | ||
| llvm_target_arch="AArch64" | ||
| ;; | ||
|
||
| linux-armv6) | ||
| SWIFT_HOST_TRIPLE="armv6-unknown-linux-gnueabihf" | ||
| llvm_target_arch="ARM" | ||
|
|
@@ -1553,12 +1557,18 @@ for host in "${ALL_HOSTS[@]}"; do | |
|
|
||
| swift) | ||
|
|
||
| if [[ "${ANDROID_API_LEVEL}" ]]; then | ||
| cmake_options=( | ||
| "${cmake_options[@]}" | ||
| -DSWIFT_ANDROID_API_LEVEL:STRING="${ANDROID_API_LEVEL}" | ||
| ) | ||
| fi | ||
|
|
||
| if [[ ! "${SKIP_BUILD_ANDROID}" ]]; then | ||
| cmake_options=( | ||
| "${cmake_options[@]}" | ||
| -DSWIFT_ANDROID_NDK_PATH:STRING="${ANDROID_NDK}" | ||
| -DSWIFT_ANDROID_NDK_GCC_VERSION:STRING="${ANDROID_NDK_GCC_VERSION}" | ||
| -DSWIFT_ANDROID_API_LEVEL:STRING="${ANDROID_API_LEVEL}" | ||
| -DSWIFT_ANDROID_${ANDROID_ARCH}_ICU_UC:STRING="${ANDROID_ICU_UC}" | ||
| -DSWIFT_ANDROID_${ANDROID_ARCH}_ICU_UC_INCLUDE:STRING="${ANDROID_ICU_UC_INCLUDE}" | ||
| -DSWIFT_ANDROID_${ANDROID_ARCH}_ICU_I18N:STRING="${ANDROID_ICU_I18N}" | ||
|
|
@@ -2192,6 +2202,8 @@ for host in "${ALL_HOSTS[@]}"; do | |
| HOST_CXX_HEADERS_DIR="$HOST_CXX_DIR/../../usr/include/c++" | ||
| elif [[ "$(uname -s)" == "Haiku" ]] ; then | ||
| HOST_CXX_HEADERS_DIR="/boot/system/develop/headers/c++" | ||
| elif [[ "${ANDROID_DATA}" ]] ; then | ||
| HOST_CXX_HEADERS_DIR="$PREFIX/include/c++" | ||
| else # Linux | ||
| HOST_CXX_HEADERS_DIR="/usr/include/c++" | ||
| fi | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,7 +223,11 @@ def _apply_default_arguments(args): | |
| args.test_watchos_simulator = False | ||
|
|
||
| if not args.build_android: | ||
| args.test_android = False | ||
| # If building natively on an Android host, allow running the test suite | ||
| # without the NDK config. | ||
| if not StdlibDeploymentTarget.Android.contains(StdlibDeploymentTarget | ||
| .host_target().name): | ||
| args.test_android = False | ||
|
||
| args.test_android_host = False | ||
|
|
||
| if not args.test_android: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.