Browse Source

Merge pull request #4686 from its-pointless/llvm-9.0.1

Llvm 9.0.1
emacs-27
Leonid Plyushch 5 years ago
committed by GitHub
parent
commit
d606243dc4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      packages/libllvm/build.sh
  2. 2
      packages/libllvm/lld.subpackage.sh
  3. 2
      packages/libllvm/llvm.subpackage.sh
  4. 26
      packages/libllvm/tools-clang-lib-Driver-ToolChains-Linux.cpp.patch
  5. 13
      packages/lldb/build.sh

25
packages/libllvm/build.sh

@ -1,17 +1,15 @@
TERMUX_PKG_HOMEPAGE=https://clang.llvm.org/
TERMUX_PKG_DESCRIPTION="Modular compiler and toolchain technologies library"
TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_VERSION=9.0.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=(d6a0565cf21f22e9b4353b2eb92622e8365000a9e90a16b09b56f8157eabfe84
7ba81eef7c22ca5da688fdf9d88c20934d2d6b40bfe150ffd338900890aa4610
31c6748b235d09723fb73fea0c816ed5a3fab0f96b66f8fbc546a0fcc8688f91
9979eb1133066376cc0be29d1682bc0b0e7fb541075b391061679111ae4d3b5b)
TERMUX_PKG_SRCURL=(https://releases.llvm.org/$TERMUX_PKG_VERSION/llvm-$TERMUX_PKG_VERSION.src.tar.xz
https://releases.llvm.org/$TERMUX_PKG_VERSION/cfe-$TERMUX_PKG_VERSION.src.tar.xz
https://releases.llvm.org/$TERMUX_PKG_VERSION/lld-$TERMUX_PKG_VERSION.src.tar.xz
https://releases.llvm.org/$TERMUX_PKG_VERSION/openmp-$TERMUX_PKG_VERSION.src.tar.xz
)
TERMUX_PKG_VERSION=9.0.1
TERMUX_PKG_SHA256=(00a1ee1f389f81e9979f3a640a01c431b3021de0d42278f6508391a2f0b81c9a
5778512b2e065c204010f88777d44b95250671103e434f9dc7363ab2e3804253
86262bad3e2fd784ba8c5e2158d7aa36f12b85f2515e95bc81d65d75bb9b0c82
5c94060f846f965698574d9ce22975c0e9f04c9b14088c3af5f03870af75cace)
TERMUX_PKG_SRCURL=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/llvm-$TERMUX_PKG_VERSION.src.tar.xz
https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/clang-$TERMUX_PKG_VERSION.src.tar.xz
https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/lld-$TERMUX_PKG_VERSION.src.tar.xz
https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/openmp-$TERMUX_PKG_VERSION.src.tar.xz)
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_RM_AFTER_INSTALL="
bin/clang-check
@ -60,7 +58,7 @@ TERMUX_PKG_HAS_DEBUG=false
# common.min.50.ompt.optional should be common.deb.50.ompt.optional when doing debug build
termux_step_post_extract_package() {
mv cfe-${TERMUX_PKG_VERSION}.src tools/clang
mv clang-${TERMUX_PKG_VERSION}.src tools/clang
mv lld-${TERMUX_PKG_VERSION}.src tools/lld
mv openmp-${TERMUX_PKG_VERSION}.src projects/openmp
}
@ -97,9 +95,6 @@ termux_step_pre_configure() {
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DLLVM_TARGET_ARCH=$LLVM_TARGET_ARCH -DLLVM_TARGETS_TO_BUILD=all"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" -DLLVM_HOST_TRIPLE=$LLVM_DEFAULT_TARGET_TRIPLE"
}
termux_step_make() {
ninja || zsh
}
termux_step_post_make_install() {
if [ $TERMUX_ARCH = "arm" ]; then
cp ../src/projects/openmp/runtime/exports/common.min/include/omp.h $TERMUX_PREFIX/include

2
packages/libllvm/lld.subpackage.sh

@ -14,4 +14,4 @@ bin/ld64.lld
lib/liblldCOFF.a
lib/liblldELF.a
"
TERMUX_SUBPKG_DESCRIPTION="LD replace based on LLVM"
TERMUX_SUBPKG_DESCRIPTION="LLVM-based linker"

2
packages/libllvm/llvm.subpackage.sh

@ -20,4 +20,4 @@ share/man/man1/opt.1
share/man/man1/bugpoint.1
share/man/man1/tblgen.1
"
TERMUX_SUBPKG_DESCRIPTION="C language frontend for LLVM"
TERMUX_SUBPKG_DESCRIPTION="Modular compiler and toolchain technologies executables"

26
packages/libllvm/tools-clang-lib-Driver-ToolChains-Linux.cpp.patch

@ -1,6 +1,6 @@
--- tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2019-03-28 00:40:14.508554643 +0000
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2019-03-28 00:46:12.983564436 +0000
@@ -314,6 +314,41 @@
--- tools/clang/lib/Driver/ToolChains/Linux.cpp.orig 2019-12-21 22:30:03.676720096 +0000
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2019-12-21 22:34:42.941719383 +0000
@@ -316,6 +316,41 @@
const std::string OSLibDir = getOSLibDir(Triple, Args);
const std::string MultiarchTriple = getMultiarchTriple(D, Triple, SysRoot);
@ -42,13 +42,13 @@
// Add the multilib suffixed paths where they are available.
if (GCCInstallation.isValid()) {
@@ -652,8 +679,27 @@
@@ -656,8 +691,27 @@
return;
if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
+ if (getTriple().isAndroid()) {
+ switch (getTriple().getArch()) {
+ case llvm::Triple::x86_64:
+ if (getTriple().isAndroid()) {
+ switch (getTriple().getArch()) {
+ case llvm::Triple::x86_64:
+ addSystemInclude(DriverArgs, CC1Args, SysRoot + "@TERMUX_PREFIX@/include/x86_64-linux-android");
+ break;
+ case llvm::Triple::x86:
@ -63,15 +63,15 @@
+ break;
+ default:
+ break;
+ }
+
+ }
+
addSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/local/include");
-
+ }
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
SmallString<128> P(D.ResourceDir);
llvm::sys::path::append(P, "include");
@@ -968,7 +1014,7 @@
SmallString<128> ResourceDirInclude(D.ResourceDir);
llvm::sys::path::append(ResourceDirInclude, "include");
if (!DriverArgs.hasArg(options::OPT_nobuiltininc) &&
@@ -975,7 +1029,7 @@
}
bool Linux::isPIEDefault() const {

13
packages/lldb/build.sh

@ -1,10 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://lldb.llvm.org
TERMUX_PKG_DESCRIPTION="LLVM based debugger"
TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_VERSION=9.0.0
TERMUX_PKG_SRCURL=https://releases.llvm.org/$TERMUX_PKG_VERSION/lldb-$TERMUX_PKG_VERSION.src.tar.xz
TERMUX_PKG_SHA256=1e4c2f6a1f153f4b8afa2470d2e99dab493034c1ba8b7ffbbd7600de016d0794
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=9.0.1
TERMUX_PKG_SRCURL=https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/lldb-$TERMUX_PKG_VERSION.src.tar.xz
TERMUX_PKG_SHA256=8a7b9fd795c31a3e3cba6ce1377a2ae5c67376d92888702ce27e26f0971beb09
TERMUX_PKG_DEPENDS="libc++, libedit, libllvm, libxml2, ncurses-ui-libs"
TERMUX_PKG_BUILD_DEPENDS="libllvm-static"
TERMUX_PKG_BREAKS="lldb-dev, lldb-static"
@ -23,9 +22,9 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
"
termux_step_pre_configure() {
cd $TERMUX_PKG_TMPDIR
termux_download https://its-pointless.github.io/tblgen-llvm-lldb-9.tar.xz tblgen-llvm-lldb-9.tar.xz \
0022ca75adeeda6c87f0fde352888e7a55747de05bc93035c2172535bb35f6c5
tar xvf tblgen-llvm-lldb-9.tar.xz
termux_download https://its-pointless.github.io/tblgen-llvm-lldb-9.0.1.tar.xz tblgen-llvm-lldb-9.0.1.tar.xz \
9cfd0aa3d9988e66838d4390ea9b2f701d1d8c87c44e226e10b8afd42c004622
tar xvf tblgen-llvm-lldb-9.0.1.tar.xz
mv llvm-tblgen $TERMUX_PREFIX/bin
PATH=$PATH:$TERMUX_PKG_TMPDIR
if [ $TERMUX_ARCH = "x86_64" ]; then

Loading…
Cancel
Save