|
@ -35,15 +35,19 @@ termux_step_host_build () { |
|
|
termux_step_configure () { |
|
|
termux_step_configure () { |
|
|
cd $TERMUX_PKG_BUILDDIR |
|
|
cd $TERMUX_PKG_BUILDDIR |
|
|
LLVM_DEFAULT_TARGET_TRIPLE=$TERMUX_HOST_PLATFORM |
|
|
LLVM_DEFAULT_TARGET_TRIPLE=$TERMUX_HOST_PLATFORM |
|
|
LLVM_TARGET_ARCH=$TERMUX_ARCH |
|
|
|
|
|
if [ $TERMUX_ARCH = "arm" ]; then |
|
|
if [ $TERMUX_ARCH = "arm" ]; then |
|
|
LLVM_TARGET_ARCH=ARM |
|
|
LLVM_TARGET_ARCH=ARM |
|
|
# See https://github.com/termux/termux-packages/issues/282 |
|
|
# See https://github.com/termux/termux-packages/issues/282 |
|
|
LLVM_DEFAULT_TARGET_TRIPLE="armv7a-linux-androideabi" |
|
|
LLVM_DEFAULT_TARGET_TRIPLE="armv7a-linux-androideabi" |
|
|
elif [ $TERMUX_ARCH = "i686" ]; then |
|
|
|
|
|
LLVM_TARGET_ARCH=X86 |
|
|
|
|
|
elif [ $TERMUX_ARCH = "aarch64" ]; then |
|
|
elif [ $TERMUX_ARCH = "aarch64" ]; then |
|
|
LLVM_TARGET_ARCH=AArch64 |
|
|
LLVM_TARGET_ARCH=AArch64 |
|
|
|
|
|
elif [ $TERMUX_ARCH = "i686" ]; then |
|
|
|
|
|
LLVM_TARGET_ARCH=X86 |
|
|
|
|
|
elif [ $TERMUX_ARCH = "x86_64" ]; then |
|
|
|
|
|
LLVM_TARGET_ARCH=X86 |
|
|
|
|
|
else |
|
|
|
|
|
echo "Invalid arch: $TERMUX_ARCH" |
|
|
|
|
|
exit 1 |
|
|
fi |
|
|
fi |
|
|
# see CMakeLists.txt and tools/clang/CMakeLists.txt |
|
|
# see CMakeLists.txt and tools/clang/CMakeLists.txt |
|
|
cmake -G "Unix Makefiles" .. \ |
|
|
cmake -G "Unix Makefiles" .. \ |
|
|