libllvm: fixes following @buttaface's review
This commit is contained in:
parent
10f4528e37
commit
d048500dad
@ -50,6 +50,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR;RISCV
|
||||
-DPERL_EXECUTABLE=$(which perl)
|
||||
-DLLVM_ENABLE_FFI=ON
|
||||
-DANDROID_NDK_VERSION=${TERMUX_NDK_VERSION_NUM}
|
||||
"
|
||||
|
||||
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
||||
@ -83,11 +84,6 @@ termux_step_host_build() {
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
echo "Applying patch: compiler-rt-ndk-version.diff"
|
||||
sed "s%\@TERMUX_NDK_VERSION_NUM\@%${TERMUX_NDK_VERSION_NUM}%g" \
|
||||
"$TERMUX_PKG_BUILDER_DIR/compiler-rt-ndk-version.diff" | \
|
||||
patch --silent -p1
|
||||
|
||||
if [ "$TERMUX_PKG_QUICK_REBUILD" = "false" ]; then
|
||||
mkdir projects/openmp/runtime/src/android
|
||||
cp $TERMUX_PKG_BUILDER_DIR/nl_types.h projects/openmp/runtime/src/android
|
||||
@ -131,11 +127,6 @@ termux_step_post_make_install() {
|
||||
for tool in clang clang++ cc c++ cpp gcc g++ ${TERMUX_HOST_PLATFORM}-{clang,clang++,gcc,g++,cpp}; do
|
||||
ln -f -s clang-${TERMUX_PKG_VERSION:0:2} $tool
|
||||
done
|
||||
|
||||
cd $TERMUX_PREFIX/lib/clang/$TERMUX_PKG_VERSION/lib/
|
||||
# Trying to build a program with -fsanitizer=address on device leads to an error
|
||||
# due to clang looking for the libs in linux/ and not android/
|
||||
mv android/ linux/
|
||||
}
|
||||
|
||||
termux_step_post_massage() {
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- ../projects-compiler-rt-CMakeLists.txt.orig 2020-09-22 14:12:54.771097201 +0000
|
||||
+++ ./projects/compiler-rt/CMakeLists.txt 2020-09-22 16:11:07.568559345 +0000
|
||||
@@ -114,7 +114,7 @@
|
||||
endif()
|
||||
pythonize_bool(ANDROID)
|
||||
|
||||
-set(ANDROID_NDK_VERSION 18
|
||||
+set(ANDROID_NDK_VERSION @TERMUX_NDK_VERSION_NUM@
|
||||
CACHE STRING "Set this to the Android NDK version that you are using")
|
||||
|
||||
set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
@ -1,13 +1,13 @@
|
||||
TERMUX_SUBPKG_DESCRIPTION="Compiler runtime libraries for clang"
|
||||
TERMUX_SUBPKG_INCLUDE="
|
||||
lib/clang/**/bin/asan_device_setup
|
||||
lib/clang/**/bin/hwasan_symbolize
|
||||
lib/clang/**/include/fuzzer/FuzzedDataProvider.h
|
||||
lib/clang/**/include/profile/InstrProfData.inc
|
||||
lib/clang/**/include/sanitizer/
|
||||
lib/clang/**/include/xray/
|
||||
lib/clang/**/lib/linux/
|
||||
lib/clang/**/share/asan_blacklist.txt
|
||||
lib/clang/**/share/cfi_blacklist.txt
|
||||
lib/clang/**/share/hwasan_blacklist.txt
|
||||
lib/clang/*/bin/asan_device_setup
|
||||
lib/clang/*/bin/hwasan_symbolize
|
||||
lib/clang/*/include/fuzzer/FuzzedDataProvider.h
|
||||
lib/clang/*/include/profile/InstrProfData.inc
|
||||
lib/clang/*/include/sanitizer/
|
||||
lib/clang/*/include/xray/
|
||||
lib/clang/*/lib/android/
|
||||
lib/clang/*/share/asan_blacklist.txt
|
||||
lib/clang/*/share/cfi_blacklist.txt
|
||||
lib/clang/*/share/hwasan_blacklist.txt
|
||||
"
|
||||
|
@ -1,6 +1,15 @@
|
||||
diff -u -r ../llvm-4.0.1.src/tools/clang/lib/Driver/ToolChain.cpp ./tools/clang/lib/Driver/ToolChain.cpp
|
||||
--- ../llvm-4.0.1.src/tools/clang/lib/Driver/ToolChain.cpp 2016-12-14 17:46:50.000000000 +0100
|
||||
+++ ./tools/clang/lib/Driver/ToolChain.cpp 2017-07-13 12:35:02.862534376 +0200
|
||||
diff --git a/tools/clang/lib/Driver/ToolChain.cpp b/tools/clang/lib/Driver/ToolChain.cpp
|
||||
index 469ef62f1a9d..218f5af748f4 100644
|
||||
--- a/tools/clang/lib/Driver/ToolChain.cpp
|
||||
+++ b/tools/clang/lib/Driver/ToolChain.cpp
|
||||
@@ -374,6 +374,6 @@ StringRef ToolChain::getOSLibName() const {
|
||||
case llvm::Triple::Solaris:
|
||||
return "sunos";
|
||||
default:
|
||||
- return getOS();
|
||||
+ return Triple.isAndroid() ? "android":getOS();
|
||||
}
|
||||
}
|
||||
@@ -632,7 +632,7 @@
|
||||
|
||||
switch (Type) {
|
||||
|
Loading…
Reference in New Issue
Block a user