@@ -462,9 +462,10 @@ function(_add_variant_link_flags)
462462 list (APPEND link_libraries "bsd" "atomic" )
463463 list (APPEND result "-Wl,-Bsymbolic" )
464464 elseif ("${LFLAGS_SDK} " STREQUAL "ANDROID" )
465- list (APPEND link_libraries "dl" "log" "atomic" "icudataswift" "icui18nswift" "icuucswift" )
465+ list (APPEND link_libraries "dl" "log" "atomic" )
466466 # We need to add the math library, which is linked implicitly by libc++
467467 list (APPEND result "-lm" )
468+
468469 if ("${LFLAGS_ARCH} " MATCHES armv7)
469470 set (android_libcxx_path "${SWIFT_ANDROID_NDK_PATH} /sources/cxx-stl/llvm-libc++/libs/armeabi-v7a" )
470471 elseif ("${LFLAGS_ARCH} " MATCHES aarch64)
@@ -476,8 +477,17 @@ function(_add_variant_link_flags)
476477 else ()
477478 message (SEND_ERROR "unknown architecture (${LFLAGS_ARCH} ) for android" )
478479 endif ()
479- list (APPEND link_libraries "${android_libcxx_path} /libc++abi.a" )
480- list (APPEND link_libraries "${android_libcxx_path} /libc++_shared.so" )
480+
481+ # link against the custom C++ library
482+ list (APPEND link_libraries
483+ ${android_libcxx_path} /libc++abi.a
484+ ${android_libcxx_path} /libc++_shared.so)
485+
486+ # link against the ICU libraries
487+ list (APPEND link_libraries
488+ ${SWIFT_ANDROID_${LFLAGS_ARCH} _ICU_I18N}
489+ ${SWIFT_ANDROID_${LFLAGS_ARCH} _ICU_UC})
490+
481491 swift_android_lib_for_arch(${LFLAGS_ARCH} ${LFLAGS_ARCH} _LIB)
482492 foreach (path IN LISTS ${LFLAGS_ARCH} _LIB)
483493 list (APPEND library_search_directories ${path} )
0 commit comments