rebuild(cookcli): fix build with new Swift runtime libraries location

This commit is contained in:
Butta 2023-04-07 13:56:04 +05:30
parent f4e190b01f
commit 43e5ddfb0a
2 changed files with 4 additions and 2 deletions

View File

@ -17,7 +17,7 @@ TERMUX_PKG_ENABLE_CLANG16_PORTING=false
termux_step_make() {
termux_setup_swift
# This will check out the package dependencies, so one can be patched.
# This will check out the package dependencies, so one can be patched first.
$SWIFT_BINDIR/swift package update
patch -p1 < $TERMUX_PKG_BUILDER_DIR/cook-dependencies.diff

View File

@ -26,6 +26,8 @@ termux_setup_swift() {
export SWIFT_BINDIR="$SWIFT_FOLDER/usr/bin"
export SWIFT_CROSSCOMPILE_CONFIG="$SWIFT_FOLDER/usr/android-$TERMUX_ARCH.json"
if [ ! -z ${TERMUX_STANDALONE_TOOLCHAIN+x} ]; then
local MULTILIB_DIR="$TERMUX_ARCH-linux-android"
test $TERMUX_ARCH == 'arm' && MULTILIB_DIR+="eabi"
cat <<- EOF > $SWIFT_CROSSCOMPILE_CONFIG
{ "version": 1,
"target": "${SWIFT_TARGET_TRIPLE}",
@ -34,7 +36,7 @@ termux_setup_swift() {
"extra-cc-flags": [ "-fPIC" ],
"extra-swiftc-flags": [ "-resource-dir", "${TERMUX_PREFIX}/lib/swift",
"-Xcc", "-I${TERMUX_PREFIX}/include",
"-L${TERMUX_PREFIX}/lib",
"-L${TERMUX_PREFIX}/opt/ndk-multilib/$MULTILIB_DIR/lib", "-L${TERMUX_PREFIX}/lib",
"-tools-directory", "${TERMUX_STANDALONE_TOOLCHAIN}/bin", ],
"extra-cpp-flags": [ "-lstdc++" ] }
EOF