clang: Fix build when python2.7 has been built
This commit is contained in:
parent
d33a847d03
commit
e8df72c0b9
@ -11,11 +11,16 @@ TERMUX_PKG_DEPENDS="binutils, ncurses, ndk-sysroot, ndk-stl, libgcc"
|
|||||||
# Replace gcc since gcc is deprecated by google on android and is not maintained upstream.
|
# Replace gcc since gcc is deprecated by google on android and is not maintained upstream.
|
||||||
TERMUX_PKG_CONFLICTS=gcc
|
TERMUX_PKG_CONFLICTS=gcc
|
||||||
TERMUX_PKG_REPLACES=gcc
|
TERMUX_PKG_REPLACES=gcc
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DCMAKE_INSTALL_ALWAYS=1 -DLLVM_ENABLE_PIC=ON -DLLVM_BUILD_TESTS=OFF"
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DLLVM_INCLUDE_TESTS=OFF -DCLANG_INCLUDE_TESTS=OFF -DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF"
|
-DLLVM_ENABLE_PIC=ON
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DBUILD_SHARED_LIBS=ON -DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen"
|
-DLLVM_BUILD_TESTS=OFF
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DCLANG_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/clang-tblgen"
|
-DLLVM_INCLUDE_TESTS=OFF
|
||||||
TERMUX_PKG_FORCE_CMAKE=yes
|
-DCLANG_INCLUDE_TESTS=OFF
|
||||||
|
-DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF
|
||||||
|
-DBUILD_SHARED_LIBS=ON
|
||||||
|
-DPYTHON_EXECUTABLE=`which python2.7`
|
||||||
|
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen
|
||||||
|
-DCLANG_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/clang-tblgen"
|
||||||
|
|
||||||
termux_step_post_extract_package () {
|
termux_step_post_extract_package () {
|
||||||
CLANG_SRC_TAR=cfe-${TERMUX_PKG_VERSION}.src.tar.xz
|
CLANG_SRC_TAR=cfe-${TERMUX_PKG_VERSION}.src.tar.xz
|
||||||
@ -23,17 +28,10 @@ termux_step_post_extract_package () {
|
|||||||
$TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR \
|
$TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR \
|
||||||
e6c4cebb96dee827fa0470af313dff265af391cb6da8d429842ef208c8f25e63
|
e6c4cebb96dee827fa0470af313dff265af391cb6da8d429842ef208c8f25e63
|
||||||
|
|
||||||
# COMPILERRT_SRC_TAR=compiler-rt-${TERMUX_PKG_VERSION}.src.tar.xz
|
|
||||||
# test ! -f $TERMUX_PKG_CACHEDIR/$COMPILERRT_SRC_TAR && curl http://llvm.org/releases/${TERMUX_PKG_VERSION}/${COMPILERRT_SRC_TAR} > $TERMUX_PKG_CACHEDIR/$COMPILERRT_SRC_TAR
|
|
||||||
|
|
||||||
tar -xf $TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR -C tools
|
tar -xf $TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR -C tools
|
||||||
mv tools/cfe-${TERMUX_PKG_VERSION}.src tools/clang
|
mv tools/cfe-${TERMUX_PKG_VERSION}.src tools/clang
|
||||||
|
|
||||||
# tar -xf $TERMUX_PKG_CACHEDIR/$COMPILERRT_SRC_TAR -C projects
|
export CMAKE_INSTALL_ALWAYS=1
|
||||||
# mv projects/compiler-rt-${TERMUX_PKG_VERSION}.src projects/compiler-rt
|
|
||||||
|
|
||||||
# Remove symlinks which are not overwritten on repeated builds even with CMAKE_INSTALL_ALWAYS=1:
|
|
||||||
rm -f $TERMUX_PREFIX/{bin/llvm*,lib/libLLVM*,lib/libclang*}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
termux_step_host_build () {
|
termux_step_host_build () {
|
||||||
|
Loading…
Reference in New Issue
Block a user