-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Add support for building swift host libraries and tools for android host #23742
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
Conversation
…ctories add_sourcekit_default_compiler_flags was invoking _add_variant_link_flags and getting link flags but not actually using the link_libraries or library_search_directories. In android builds, this means that the correct libc++ is not being linked against.
…ectories
The CMake variables ${sdk} and ${arch} are only set if
_add_variant_link_flags is invoked from add_swift_target_library calling
_add_swift_library_single. If you get to _add_swift_library_single from
add_swift_host_library, those variables will not be set and subsequent
linking will not find ICU libraries. This was an issue when building
swift host libraries on Android.
CMakeLists.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nicer if we sink the if (NOT ${SWIFT_ANDROID_NDK_PATH} STREQUAL "") into the case, as an always thing.
if(swift_build_android AND NOT ${SWIFT_HOST_VARIANT_SDK} STREQUAL ANDROID)
if("${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
message(FATAL_ERROR "SWIFT_ANDROID_NDK_PATH must be set to the Android NDK path")
endif()
cmake/modules/AddSwift.cmake
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WTF???!!!
|
@swift-ci please test |
8a28136 to
822eeb6
Compare
|
Build failed |
|
@swift-ci please smoke test and merge |
|
Umm, why was this merged when there's a more comprehensive Android pull, #23208, that's been waiting for weeks now? |
|
@buttaface: I will answer you in the other thread. |
I'd like to be able to build android host tools and libraries on android.
cc @compnerd @drodriguez