@@ -462,9 +462,10 @@ function(_add_variant_link_flags)
462
462
list (APPEND link_libraries "bsd" "atomic" )
463
463
list (APPEND result "-Wl,-Bsymbolic" )
464
464
elseif ("${LFLAGS_SDK} " STREQUAL "ANDROID" )
465
- list (APPEND link_libraries "dl" "log" "atomic" "icudataswift" "icui18nswift" "icuucswift" )
465
+ list (APPEND link_libraries "dl" "log" "atomic" )
466
466
# We need to add the math library, which is linked implicitly by libc++
467
467
list (APPEND result "-lm" )
468
+
468
469
if ("${LFLAGS_ARCH} " MATCHES armv7 )
469
470
set (android_libcxx_path "${SWIFT_ANDROID_NDK_PATH} /sources/cxx-stl/llvm-libc++/libs/armeabi-v7a" )
470
471
elseif ("${LFLAGS_ARCH} " MATCHES aarch64 )
@@ -476,8 +477,17 @@ function(_add_variant_link_flags)
476
477
else ()
477
478
message (SEND_ERROR "unknown architecture (${LFLAGS_ARCH} ) for android" )
478
479
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
+
481
491
swift_android_lib_for_arch (${LFLAGS_ARCH} ${LFLAGS_ARCH} _LIB )
482
492
foreach (path IN LISTS ${LFLAGS_ARCH} _LIB )
483
493
list (APPEND library_search_directories ${path} )
0 commit comments