diff --git a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt index 016bf294..cd534f16 100644 --- a/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt +++ b/swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt @@ -166,7 +166,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows) target_link_options(Foundation PRIVATE $) elseif(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin) + if(NOT BUILD_SHARED_LIBS) + target_compile_options(Foundation PRIVATE "SHELL:-disallow-use-new-driver") + endif() target_link_options(Foundation PRIVATE "SHELL:-no-toolchain-stdlib-rpath") + if(${CMAKE_SYSTEM_NAME} STREQUAL Android) + target_link_libraries(Foundation PRIVATE android-spawn) + target_link_directories(Foundation PUBLIC ${CMAKE_FIND_ROOT_PATH}/usr/lib) + endif() endif()