eab39222c5
Currently it supports only on-device builds. https://github.com/termux/termux-packages/pull/4895 How to build: cp -a ./disabled-packages/swift ./packages/ pkg install clang binutils-gold file patch python cmake ninja python2 perl rsync libandroid-spawn libcurl libicu libsqlite libuuid libxml2 llbuild pkg-config TERMUX_MAKE_PROCESSES=7 ./build-package.sh swift
24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
diff --git a/swift-corelibs-libdispatch/src/CMakeLists.txt b/swift-corelibs-libdispatch/src/CMakeLists.txt
|
|
index f71b68f..81c4ade 100644
|
|
--- a/swift-corelibs-libdispatch/src/CMakeLists.txt
|
|
+++ b/swift-corelibs-libdispatch/src/CMakeLists.txt
|
|
@@ -144,6 +144,7 @@ if(ENABLE_SWIFT)
|
|
-lBlocksRuntime
|
|
-L $<TARGET_LINKER_FILE_DIR:dispatch>
|
|
-ldispatch
|
|
+ -Xlinker -rpath -Xlinker "\\\$\$ORIGIN"
|
|
$<$<AND:$<PLATFORM_ID:Windows>,$<CONFIG:Debug>>:-lmsvcrtd>
|
|
$<$<AND:$<PLATFORM_ID:Windows>,$<NOT:$<CONFIG:Debug>>>:-lmsvcrt>
|
|
MODULE_NAME
|
|
@@ -260,6 +261,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
|
"-Xlinker -dead_strip"
|
|
"-Xlinker -alias_list -Xlinker ${PROJECT_SOURCE_DIR}/xcodeconfig/libdispatch.aliases")
|
|
endif()
|
|
+
|
|
+set_target_properties(dispatch PROPERTIES INSTALL_RPATH "$ORIGIN")
|
|
+set_target_properties(dispatch PROPERTIES BUILD_WITH_INSTALL_RPATH YES)
|
|
+
|
|
dispatch_set_linker(dispatch)
|
|
|
|
install(TARGETS
|