Skip to content

Conversation

@bulbazord
Copy link
Contributor

I'd like to be able to build android host tools and libraries on android.

cc @compnerd @drodriguez

…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
Copy link
Member

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()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WTF???!!!

@compnerd
Copy link
Member

compnerd commented Apr 2, 2019

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Apr 2, 2019

Build failed
Swift Test Linux Platform
Git Sha - 8a28136cd56d3cdd679c18cdfc7a67e607fa2150

@compnerd
Copy link
Member

compnerd commented Apr 3, 2019

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit fa7f8c4 into swiftlang:master Apr 3, 2019
@finagolfin
Copy link
Member

Umm, why was this merged when there's a more comprehensive Android pull, #23208, that's been waiting for weeks now?

@drodriguez
Copy link
Contributor

@buttaface: I will answer you in the other thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants