termux-packages/packages/swift/swift-utils-build-script-impl

28 lines
1.5 KiB
Plaintext

diff --git a/swift/utils/build-script-impl b/swift/utils/build-script-impl
index b1d060328bc..218c9215260 100755
--- a/swift/utils/build-script-impl
+++ b/swift/utils/build-script-impl
@@ -1745,6 +1753,13 @@ for host in "${ALL_HOSTS[@]}"; do
-DLLVM_TABLEGEN=$(build_directory "${LOCAL_HOST}" llvm)/bin/llvm-tblgen
-DCLANG_TABLEGEN=$(build_directory "${LOCAL_HOST}" llvm)/bin/clang-tblgen
-DLLVM_NATIVE_BUILD=$(build_directory "${LOCAL_HOST}" llvm)
+ -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS --target=$CCTERMUX_HOST_PLATFORM"
+ -DCMAKE_MODULE_LINKER_FLAGS="$LDFLAGS --target=$CCTERMUX_HOST_PLATFORM"
+ -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS --target=$CCTERMUX_HOST_PLATFORM"
+ -DCMAKE_SYSTEM_NAME=Android
+ -DCMAKE_SYSTEM_VERSION=@TERMUX_PKG_API_LEVEL@
+ -DCMAKE_SYSTEM_PROCESSOR=@TERMUX_ARCH@
+ -DCMAKE_ANDROID_STANDALONE_TOOLCHAIN="@TERMUX_STANDALONE_TOOLCHAIN@"
)
fi
@@ -2471,7 +2480,7 @@ for host in "${ALL_HOSTS[@]}"; do
elif [[ "${ANDROID_DATA}" ]] ; then
HOST_CXX_HEADERS_DIR="$PREFIX/include/c++"
else # Linux
- HOST_CXX_HEADERS_DIR="/usr/include/c++"
+ HOST_CXX_HEADERS_DIR="@TERMUX_STANDALONE_TOOLCHAIN@/sysroot/usr/include/c++"
fi
# Find the path in which the local clang build is expecting to find