Remove disabled-packages/llvm

This commit is contained in:
Fredrik Fornwall 2017-09-20 23:16:46 +02:00
parent 6fcac94774
commit ed184fc7bc
10 changed files with 0 additions and 271 deletions

View File

@ -1,67 +0,0 @@
--- ./tools/lldb/source/Host/CMakeLists.txt 2015-10-30 08:24:52.000000000 +0530
+++ ./tools/lldb/source/Host/CMakeLists.txt 2017-01-10 21:14:16.132877692 +0530
@@ -115,7 +115,7 @@
macosx/cfcpp/CFCString.cpp
)
- elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
+ elseif (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
if (__ANDROID_NDK__)
add_host_subdirectory(android
android/HostInfoAndroid.cpp
--- ./tools/lldb/scripts/Python/modules/CMakeLists.txt 2015-02-13 15:52:00.000000000 +0530
+++ ./tools/lldb/scripts/Python/modules/CMakeLists.txt 2017-01-10 22:03:15.069857246 +0530
@@ -5,7 +5,6 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined")
endif ()
-# build the Python readline suppression module only on Linux
-if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT __ANDROID_NDK__)
+if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
add_subdirectory(readline)
endif()
--- ./tools/lldb/tools/lldb-server/CMakeLists.txt 2016-01-29 17:29:57.000000000 +0530
+++ ./tools/lldb/tools/lldb-server/CMakeLists.txt 2017-01-10 22:06:03.981423698 +0530
@@ -1,4 +1,4 @@
-if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android" )
include_directories(
../../../../llvm/include
../../source/Plugins/Process/Linux
--- ./tools/lldb/source/CMakeLists.txt 2015-10-24 05:57:04.000000000 +0530
+++ ./tools/lldb/source/CMakeLists.txt 2017-01-10 22:10:44.805026352 +0530
@@ -1,6 +1,6 @@
include_directories(.)
-if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android" )
include_directories(
Plugins/Process/Linux
Plugins/Process/POSIX
--- ./tools/lldb/source/Plugins/Platform/CMakeLists.txt 2015-10-24 05:57:04.000000000 +0530
+++ ./tools/lldb/source/Plugins/Platform/CMakeLists.txt 2017-01-10 22:15:36.255075635 +0530
@@ -1,4 +1,4 @@
-#if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+#if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
add_subdirectory(Linux)
#elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_subdirectory(FreeBSD)
--- ./tools/lldb/source/Plugins/Process/CMakeLists.txt 2015-10-28 23:51:45.000000000 +0530
+++ ./tools/lldb/source/Plugins/Process/CMakeLists.txt 2017-01-10 22:18:20.019868513 +0530
@@ -1,4 +1,4 @@
-if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
add_subdirectory(Linux)
add_subdirectory(POSIX)
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
--- ./tools/llvm-shlib/CMakeLists.txt 2016-05-26 10:05:35.000000000 +0530
+++ ./tools/llvm-shlib/CMakeLists.txt 2017-01-12 16:43:02.136137108 +0530
@@ -39,7 +39,7 @@
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
list(REMOVE_DUPLICATES LIB_NAMES)
-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Android") # FIXME: It should be "GNU ld for elf"
# GNU ld doesn't resolve symbols in the version script.
set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")

View File

@ -1,48 +0,0 @@
--- ./tools/lldb/cmake/LLDBDependencies.cmake 2016-06-29 18:00:18.000000000 +0530
+++ ./tools/lldb/cmake/LLDBDependencies.cmake 2017-01-11 09:25:05.792269231 +0530
@@ -96,7 +96,7 @@
endif ()
# Linux-only libraries
-if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
+if ( CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android" )
list(APPEND LLDB_USED_LIBS
lldbPluginProcessLinux
lldbPluginProcessPOSIX
--- ./tools/lldb/cmake/modules/LLDBConfig.cmake 2016-05-26 21:41:04.000000000 +0530
+++ ./tools/lldb/cmake/modules/LLDBConfig.cmake 2017-01-11 09:45:50.021125774 +0530
@@ -14,13 +14,8 @@
set(LLDB_DEFAULT_DISABLE_PYTHON 0)
set(LLDB_DEFAULT_DISABLE_CURSES 1)
else()
- if ( __ANDROID_NDK__ )
- set(LLDB_DEFAULT_DISABLE_PYTHON 1)
- set(LLDB_DEFAULT_DISABLE_CURSES 1)
- else()
- set(LLDB_DEFAULT_DISABLE_PYTHON 0)
- set(LLDB_DEFAULT_DISABLE_CURSES 0)
- endif()
+ set(LLDB_DEFAULT_DISABLE_PYTHON 0)
+ set(LLDB_DEFAULT_DISABLE_CURSES 0)
endif()
set(LLDB_DISABLE_PYTHON ${LLDB_DEFAULT_DISABLE_PYTHON} CACHE BOOL
@@ -338,7 +333,7 @@
list(APPEND system_libs ${CMAKE_DL_LIBS})
endif()
-if (CMAKE_SYSTEM_NAME MATCHES "Linux")
+if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Android")
# Check for syscall used by lldb-server on linux.
# If these are not found, it will fall back to ptrace (slow) for memory reads.
check_cxx_source_compiles("
@@ -367,7 +362,8 @@
if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") OR
(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") OR
(CMAKE_SYSTEM_NAME MATCHES "Linux") OR
- (CMAKE_SYSTEM_NAME MATCHES "NetBSD"))
+ (CMAKE_SYSTEM_NAME MATCHES "NetBSD") OR
+ (CMAKE_SYSTEM_NAME MATCHES "Android"))
set(LLDB_CAN_USE_LLDB_SERVER 1)
else()
set(LLDB_CAN_USE_LLDB_SERVER 0)

View File

@ -1,98 +0,0 @@
TERMUX_PKG_HOMEPAGE=http://llvm.org
TERMUX_PKG_DESCRIPTION='Low Level Virtual Machine'
TERMUX_PKG_VERSION=3.9.1
_BASE_SRCURL=http://llvm.org/releases/${TERMUX_PKG_VERSION}
TERMUX_PKG_SRCURL=$_BASE_SRCURL/llvm-${TERMUX_PKG_VERSION}.src.tar.xz
TERMUX_PKG_SHA256=1fd90354b9cf19232e8f168faf2220e79be555df3aa743242700879e8fd329ee
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_DEPENDS="binutils, ncurses, ndk-sysroot, ndk-stl, libgcc, libffi, readline"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DLLVM_ENABLE_PIC=ON -DLLVM_BUILD_TESTS=OFF
-DLLVM_INCLUDE_TESTS=OFF -DLLVM_LINK_LLVM_DYLIB=ON -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_BUILD_TOOLS=OFF
-DLLVM_BUILD_EXAMPLES=OFF -DLLVM_ENABLE_EH=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_ENABLE_FFI=ON
-DPYTHON_EXECUTABLE=`which python2` -DLLDB_DISABLE_PYTHON=ON -DCLANG_INCLUDE_TESTS=OFF
-DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF -DLLDB_DISABLE_LIBEDIT=ON -D__ANDROID_NDK__=True -DANDROID=True"
TERMUX_PKG_FORCE_CMAKE=yes
termux_step_post_extract_package () {
CLANG_SRC_TAR=cfe-${TERMUX_PKG_VERSION}.src.tar.xz
LLDB_SRC_TAR=lldb-${TERMUX_PKG_VERSION}.src.tar.xz
LIBUNWIND_SRC_TAR=libunwind-${TERMUX_PKG_VERSION}.src.tar.xz
test ! -f $TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR && termux_download $_BASE_SRCURL/$CLANG_SRC_TAR \
$TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR e6c4cebb96dee827fa0470af313dff265af391cb6da8d429842ef208c8f25e63
test ! -f $TERMUX_PKG_CACHEDIR/$LLDB_SRC_TAR && termux_download $_BASE_SRCURL/$LLDB_SRC_TAR \
$TERMUX_PKG_CACHEDIR/$LLDB_SRC_TAR 7e3311b2a1f80f4d3426e09f9459d079cab4d698258667e50a46dccbaaa460fc
test ! -f $TERMUX_PKG_CACHEDIR/$LIBUNWIND_SRC_TAR && termux_download $_BASE_SRCURL/$LIBUNWIND_SRC_TAR \
$TERMUX_PKG_CACHEDIR/$LIBUNWIND_SRC_TAR 0b0bc73264d7ab77d384f8a7498729e3c4da8ffee00e1c85ad02a2f85e91f0e6
cd $TERMUX_PKG_SRCDIR
tar -xf $TERMUX_PKG_CACHEDIR/$CLANG_SRC_TAR -C tools
mv tools/cfe-${TERMUX_PKG_VERSION}.src tools/clang
tar -xf $TERMUX_PKG_CACHEDIR/$LLDB_SRC_TAR -C tools
mv tools/lldb-${TERMUX_PKG_VERSION}.src tools/lldb
tar -xf $TERMUX_PKG_CACHEDIR/$LIBUNWIND_SRC_TAR -C tools
mv tools/libunwind-${TERMUX_PKG_VERSION}.src tools/libunwind
}
termux_step_host_build () {
cmake -G "Unix Makefiles" $TERMUX_PKG_SRCDIR \
-DLLVM_BUILD_TESTS=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_TARGETS_TO_BUILD=X86 \
-DLLVM_BUILD_TOOLS=OFF \
-DLLVM_BUILD_EXAMPLES=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PIC=OFF \
-DLLVM_ENABLE_ZLIB=OFF \
-DLLVM_OPTIMIZED_TABLEGEN=ON
make -j $TERMUX_MAKE_PROCESSES llvm-tblgen clang-tblgen
}
termux_step_pre_configure () {
LLVM_DEFAULT_TARGET_TRIPLE=$TERMUX_HOST_PLATFORM
if [ $TERMUX_ARCH = "arm" ]; then
LLVM_TARGET_ARCH=ARM
# See https://github.com/termux/termux-packages/issues/282
LLVM_DEFAULT_TARGET_TRIPLE="armv7a-linux-androideabi"
elif [ $TERMUX_ARCH = "aarch64" ]; then
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
CXXFLAGS="$CXXFLAGS -D__ANDROID_NDK__ -DANDROID"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen
-DLLVM_DEFAULT_TARGET_TRIPLE=$LLVM_DEFAULT_TARGET_TRIPLE -DLLVM_TARGET_ARCH=$LLVM_TARGET_ARCH
-DLLVM_TARGETS_TO_BUILD=$LLVM_TARGET_ARCH -DCLANG_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/clang-tblgen
-DC_INCLUDE_DIRS=$TERMUX_PREFIX/include"
#-DHAVE_UNWIND_BACKTRACE=False" # arm has two conflicting defs for __Unwind_Ptr
}
termux_step_make_install () {
create_file_lists
cd $TERMUX_PKG_BUILDDIR
make install
}
# this function creates file_lists for subpackages
create_file_lists () {
mkdir $TERMUX_PKG_BUILDDIR/../{lldb,clang,libunwind}
make -C tools/lldb DESTDIR="$TERMUX_PKG_BUILDDIR/../lldb" install
make -C tools/clang DESTDIR="$TERMUX_PKG_BUILDDIR/../clang" install
make -C tools/libunwind DESTDIR="$TERMUX_PKG_BUILDDIR/../libunwind" install
cd "$TERMUX_PKG_BUILDDIR/../lldb$TERMUX_PREFIX"
find * -type f > "$TERMUX_PKG_BUILDDIR/file_list_lldb.txt"
cd "$TERMUX_PKG_BUILDDIR/../clang$TERMUX_PREFIX"
find * -type f > "$TERMUX_PKG_BUILDDIR/file_list_clang.txt"
cd "$TERMUX_PKG_BUILDDIR/../libunwind$TERMUX_PREFIX"
find * -type f > "$TERMUX_PKG_BUILDDIR/file_list_libunwind.txt"
rm -r $TERMUX_PKG_BUILDDIR/../{lldb,clang,libunwind}
}

View File

@ -1,3 +0,0 @@
TERMUX_SUBPKG_INCLUDE="include/clang include/clang-c lib/cmake/clang lib/clang/$TERMUX_PKG_VERSION"
TERMUX_SUBPKG_DESCRIPTION='C language family frontend for LLVM (development files)'
TERMUX_SUBPKG_DEPENDS="clang"

View File

@ -1,5 +0,0 @@
TERMUX_SUBPKG_INCLUDE="bin/clang* bin/scan-build bin/scan-view bin/git-clang-format lib/libclang* "
TERMUX_SUBPKG_INCLUDE+="libexec/ccc-analyzer libexec++-analyzer share/scan-view "
TERMUX_SUBPKG_INCLUDE+="share/clang share/man/man1/scan-build.1 share/scan-build"
TERMUX_SUBPKG_DESCRIPTION='C language family frontend for LLVM'
TERMUX_SUBPKG_DEPENDS="llvm"

View File

@ -1,3 +0,0 @@
TERMUX_SUBPKG_INCLUDE="include/lldb"
TERMUX_SUBPKG_DESCRIPTION='Next generation, high-performance debugger (development files)'
TERMUX_SUBPKG_DEPENDS="lldb"

View File

@ -1,3 +0,0 @@
TERMUX_SUBPKG_INCLUDE="bin/lldb* lib/liblldb*"
TERMUX_SUBPKG_DESCRIPTION='Next generation, high-performance debugger'
TERMUX_SUBPKG_DEPENDS="llvm, ncurses"

View File

@ -1,12 +0,0 @@
diff -u -r ../llvm-3.8.0.src/tools/clang/lib/Driver/ToolChain.cpp ./tools/clang/lib/Driver/ToolChain.cpp
--- ../llvm-3.8.0.src/tools/clang/lib/Driver/ToolChain.cpp 2015-11-25 20:02:07.000000000 -0500
+++ ./tools/clang/lib/Driver/ToolChain.cpp 2016-05-02 08:50:35.526226962 -0400
@@ -611,7 +611,7 @@
break;
case ToolChain::CST_Libstdcxx:
- CmdArgs.push_back("-lstdc++");
+ CmdArgs.push_back("-lgnustl_shared");
break;
}
}

View File

@ -1,17 +0,0 @@
diff -u -r ../llvm-3.9.0.src/tools/clang/lib/Driver/Tools.cpp ./tools/clang/lib/Driver/Tools.cpp
--- ../llvm-3.9.0.src/tools/clang/lib/Driver/Tools.cpp 2016-08-13 16:43:56.000000000 -0400
+++ ./tools/clang/lib/Driver/Tools.cpp 2016-09-04 06:15:59.703422745 -0400
@@ -9357,9 +9357,12 @@
const llvm::Triple::ArchType Arch = ToolChain.getArch();
const bool isAndroid = ToolChain.getTriple().isAndroid();
const bool IsIAMCU = ToolChain.getTriple().isOSIAMCU();
+ // Termux modification: Enable pie by default for Android and support the
+ // nopie flag.
const bool IsPIE =
!Args.hasArg(options::OPT_shared) && !Args.hasArg(options::OPT_static) &&
- (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault());
+ (Args.hasArg(options::OPT_pie) || ToolChain.isPIEDefault() || isAndroid) &&
+ !Args.hasArg(options::OPT_nopie);
const bool HasCRTBeginEndFiles =
ToolChain.getTriple().hasEnvironment() ||
(ToolChain.getTriple().getVendor() != llvm::Triple::MipsTechnologies);

View File

@ -1,15 +0,0 @@
Workaround bug https://github.com/android-ndk/ndk/issues/82 where std::to_string
is not available yet.
diff -u -r ../llvm-3.9.0.src/tools/sancov/sancov.cc ./tools/sancov/sancov.cc
--- ../llvm-3.9.0.src/tools/sancov/sancov.cc 2016-07-13 22:24:01.000000000 -0400
+++ ./tools/sancov/sancov.cc 2016-09-04 11:48:19.647813216 -0400
@@ -512,7 +512,7 @@
static std::string formatHtmlPct(size_t Pct) {
Pct = std::max(std::size_t{0}, std::min(std::size_t{100}, Pct));
- std::string Num = std::to_string(Pct);
+ std::string Num = llvm::utostr(Pct);
std::string Zeroes(3 - Num.size(), '0');
if (!Zeroes.empty())
Zeroes = "<span class='lz'>" + Zeroes + "</span>";