termux-packages/packages/swift/swift-corelibs-foundation-S...

23 lines
1.0 KiB
Diff

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,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows)
target_link_options(Foundation PRIVATE
$<TARGET_OBJECTS:CoreFoundationResources>)
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)
+ if(BUILD_SHARED_LIBS AND ${CMAKE_SYSTEM_PROCESSOR} STREQUAL armv7-a)
+ target_link_libraries(Foundation PRIVATE gcc_real)
+ endif()
+ endif()
endif()