termux-packages/disabled-packages/swift/llbuild-cmake-modules-Utility.cmake.patch
Leonid Pliushch eab39222c5 move 'swift' to disabled packages
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
2020-02-17 13:47:32 +02:00

23 lines
1.1 KiB
Diff

diff --git a/llbuild/cmake/modules/Utility.cmake b/llbuild/cmake/modules/Utility.cmake
index b287975..6a1859e 100644
--- a/llbuild/cmake/modules/Utility.cmake
+++ b/llbuild/cmake/modules/Utility.cmake
@@ -208,7 +208,7 @@ function(add_swift_module target name deps sources additional_args)
list(APPEND DYLYB_ARGS -Xlinker -rpath -Xlinker @loader_path)
list(APPEND DYLYB_ARGS -Xlinker -install_name -Xlinker @rpath/${target}.${DYLIB_EXT})
else()
- list(APPEND DYLYB_ARGS -Xlinker "-rpath=\\$$ORIGIN")
+ #list(APPEND DYLYB_ARGS -Xlinker "-rpath=\\$$ORIGIN")
endif()
# Runpath for finding Swift core libraries in the toolchain.
@@ -216,7 +216,7 @@ function(add_swift_module target name deps sources additional_args)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
list(APPEND DYLYB_ARGS -Xlinker -rpath -Xlinker @loader_path/../../macosx)
else()
- list(APPEND DYLYB_ARGS -Xlinker "-rpath=\\$$ORIGIN/../../linux")
+ list(APPEND DYLYB_ARGS -Xlinker "-rpath=\\$$ORIGIN/../../android")
endif()
list(APPEND DYLYB_ARGS -L ${LLBUILD_LIBRARY_OUTPUT_INTDIR})