update to llvm9 and fix tools in rust
This commit is contained in:
parent
bf220872fc
commit
8e72ae8a1d
68
packages/libllvm/ORCv2.rst.patch
Normal file
68
packages/libllvm/ORCv2.rst.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From fe4cc4507a5f23efd105194b017d28311d1620e4 Mon Sep 17 00:00:00 2001
|
||||
From: Lang Hames <lhames@gmail.com>
|
||||
Date: Wed, 31 Jul 2019 18:07:37 +0000
|
||||
Subject: [PATCH] [docs] Add references to unreferenced footnotes.
|
||||
|
||||
Thanks to Stefan Granitz for catching the issue.
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367458 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
docs/ORCv2.rst | 26 +++++++++++++-------------
|
||||
1 file changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/docs/ORCv2.rst b/docs/ORCv2.rst
|
||||
index 7423c041d40a..4f9e08b9a154 100644
|
||||
--- a/docs/ORCv2.rst
|
||||
+++ b/docs/ORCv2.rst
|
||||
@@ -153,8 +153,8 @@ Design Overview
|
||||
ORC's JIT'd program model aims to emulate the linking and symbol resolution
|
||||
rules used by the static and dynamic linkers. This allows ORC to JIT
|
||||
arbitrary LLVM IR, including IR produced by an ordinary static compiler (e.g.
|
||||
-clang) that uses constructs like symbol linkage and visibility, and weak and
|
||||
-common symbol definitions.
|
||||
+clang) that uses constructs like symbol linkage and visibility, and weak [4]_
|
||||
+and common symbol definitions.
|
||||
|
||||
To see how this works, imagine a program ``foo`` which links against a pair
|
||||
of dynamic libraries: ``libA`` and ``libB``. On the command line, building this
|
||||
@@ -326,7 +326,7 @@ prefix in LLVM 8.0, and have deprecation warnings attached in LLVM 9.0. In LLVM
|
||||
10.0 ORCv1 will be removed entirely.
|
||||
|
||||
Transitioning from ORCv1 to ORCv2 should be easy for most clients. Most of the
|
||||
-ORCv1 layers and utilities have ORCv2 counterparts[2]_ that can be directly
|
||||
+ORCv1 layers and utilities have ORCv2 counterparts [2]_ that can be directly
|
||||
substituted. However there are some design differences between ORCv1 and ORCv2
|
||||
to be aware of:
|
||||
|
||||
@@ -497,8 +497,8 @@ locking must be done explicitly:
|
||||
}
|
||||
|
||||
Clients wishing to maximize possibilities for concurrent compilation will want
|
||||
-to create every new ThreadSafeModule on a new ThreadSafeContext. For this reason
|
||||
-a convenience constructor for ThreadSafeModule is provided that implicitly
|
||||
+to create every new ThreadSafeModule on a new ThreadSafeContext [3]_. For this
|
||||
+reason a convenience constructor for ThreadSafeModule is provided that implicitly
|
||||
constructs a new ThreadSafeContext value from a std::unique_ptr<LLVMContext>:
|
||||
|
||||
.. code-block:: c++
|
||||
@@ -622,11 +622,11 @@ TBD: Speculative compilation. Object Caches.
|
||||
|
||||
.. [3] Sharing ThreadSafeModules in a concurrent compilation can be dangerous:
|
||||
if interdependent modules are loaded on the same context, but compiled
|
||||
- on different threads a deadlock may occur (with each compile waiting for
|
||||
- the other(s) to complete, and the other(s) unable to proceed because the
|
||||
- context is locked).
|
||||
-
|
||||
-.. [4] Mostly. Weak definitions are handled correctly within dylibs, but if
|
||||
- multiple dylibs provide a weak definition of a symbol each will end up
|
||||
- with its own definition (similar to how weak symbols in Windows DLLs
|
||||
- behave). This will be fixed in the future.
|
||||
\ No newline at end of file
|
||||
+ on different threads a deadlock may occur, with each compile waiting for
|
||||
+ the other to complete, and the other unable to proceed because the
|
||||
+ context is locked.
|
||||
+
|
||||
+.. [4] Weak definitions are currently handled correctly within dylibs, but if
|
||||
+ multiple dylibs provide a weak definition of a symbol then each will end
|
||||
+ up with its own definition (similar to how weak definitions are handled
|
||||
+ in Windows DLLs). This will be fixed in the future.
|
@ -1,16 +1,16 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://clang.llvm.org/
|
||||
TERMUX_PKG_DESCRIPTION="Modular compiler and toolchain technologies library"
|
||||
TERMUX_PKG_LICENSE="NCSA"
|
||||
TERMUX_PKG_VERSION=8.0.1
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SHA256=(44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7
|
||||
70effd69f7a8ab249f66b0a68aba8b08af52aa2ab710dfb8a0fba102685b1646
|
||||
9fba1e94249bd7913e8a6c3aadcb308b76c8c3d83c5ce36c99c3f34d73873d88
|
||||
3e85dd3cad41117b7c89a41de72f2e6aa756ea7b4ef63bb10dcddf8561a7722c)
|
||||
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/cfe-$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_VERSION=9.0.0
|
||||
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_HOSTBUILD=true
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
bin/clang-check
|
||||
@ -95,13 +95,15 @@ 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.50/include/omp.h $TERMUX_PREFIX/include
|
||||
cp ../src/projects/openmp/runtime/exports/common.min/include/omp.h $TERMUX_PREFIX/include
|
||||
else
|
||||
cp ../src/projects/openmp/runtime/exports/common.min.50.ompt.optional/include/omp.h $TERMUX_PREFIX/include
|
||||
fi
|
||||
|
||||
cp ../src/projects/openmp/runtime/exports/common.min.ompt.optional/include/omp.h $TERMUX_PREFIX/include
|
||||
fi
|
||||
if [ "$TERMUX_CMAKE_BUILD" = Ninja ]; then
|
||||
ninja docs-llvm-man
|
||||
else
|
||||
|
@ -6,8 +6,7 @@ TERMUX_PKG_VERSION=1.38.0
|
||||
TERMUX_PKG_SRCURL=https://static.rust-lang.org/dist/rustc-$TERMUX_PKG_VERSION-src.tar.xz
|
||||
TERMUX_PKG_SHA256=3a7991aa4cb44ef941d71636e45a95468b520dc6fc7cf725364925bd3e3d3a34
|
||||
TERMUX_PKG_DEPENDS="libc++, clang, openssl, lld, zlib"
|
||||
TERMUX_PKG_BLACKLISTED_ARCHES="x86_64"
|
||||
|
||||
TERMUX_PKG_REVISION=1
|
||||
termux_step_configure() {
|
||||
termux_setup_cmake
|
||||
termux_setup_rust
|
||||
@ -18,9 +17,9 @@ termux_step_configure() {
|
||||
# configuration is used otherwise it fails a long time into the build...
|
||||
# like 30 to 40 + minutes ... so lets get it right
|
||||
|
||||
# 1.36 needs 1.35 to build revert to using $TERMUX_PKG_VERSION next time..
|
||||
# upstream only tests build ver one version behind $TERMUX_PKG_VERSION
|
||||
rustup install 1.37.0
|
||||
export PATH=$HOME/.rustup/toolchains/1.37.0-x86_64-unknown-linux-gnu/bin:$PATH
|
||||
export PATH=$TERMUX_COMMON_CACHEDIR/toolchains/1.37.0-x86_64-unknown-linux-gnu/bin:$PATH
|
||||
local RUSTC=$(which rustc)
|
||||
local CARGO=$(which cargo)
|
||||
|
||||
@ -42,16 +41,21 @@ termux_step_configure() {
|
||||
export CC_x86_64_unknown_linux_gnu=gcc
|
||||
export CFLAGS_x86_64_unknown_linux_gnu="-O2"
|
||||
unset CC CXX CPP LD CFLAGS CXXFLAGS CPPFLAGS LDFLAGS PKG_CONFIG AR RANLIB
|
||||
# rust checks libs in PREFIX/lib because both host and target are x86_64. It then can't libc.so and libdl.so because rust program doesn't know
|
||||
# where those are. Putting them temporarly in $PREFIX/lib prevents that failure
|
||||
if [ $TERMUX_ARCH = "x86_64" ]; then
|
||||
cp $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/x86_64-linux-android/$TERMUX_PKG_API_LEVEL/libc.so $TERMUX_PREFIX/lib/
|
||||
cp $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/x86_64-linux-android/$TERMUX_PKG_API_LEVEL/libdl.so $TERMUX_PREFIX/lib/
|
||||
fi
|
||||
}
|
||||
|
||||
termux_step_make() {
|
||||
$TERMUX_PKG_SRCDIR/x.py dist
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
$TERMUX_PKG_SRCDIR/x.py install
|
||||
|
||||
# ugly fix to get extended tools working
|
||||
$TERMUX_PKG_SRCDIR/x.py install --host $CARGO_TARGET_NAME --target $CARGO_TARGET_NAME --target wasm32-unknown-unknown || cp ./build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_macros-*.so ./build/x86_64-unknown-linux-gnu/stage2-tools/release/deps/librustc_macros-*.so
|
||||
$TERMUX_PKG_SRCDIR/x.py install --host $CARGO_TARGET_NAME --target $CARGO_TARGET_NAME --target wasm32-unknown-unknown || true
|
||||
cd "$TERMUX_PREFIX/lib"
|
||||
rm -f libc.so libdl.so
|
||||
ln -sf rustlib/$CARGO_TARGET_NAME/lib/*.so .
|
||||
ln -sf $TERMUX_PREFIX/bin/lld $TERMUX_PREFIX/bin/rust-lld
|
||||
|
||||
|
@ -14,7 +14,7 @@ python = "python2.7"
|
||||
extended = true
|
||||
sanitizers = false
|
||||
|
||||
tools = ["cargo", "analysis"]
|
||||
#tools = ["cargo", "analysis", "rls", "rustfmt", "clippy-driver" ]
|
||||
|
||||
[install]
|
||||
prefix = "@TERMUX_PREFIX@"
|
||||
@ -37,4 +37,4 @@ llvm-config = "@TERMUX_PREFIX@/bin/llvm-config"
|
||||
|
||||
[dist]
|
||||
src-tarball = false
|
||||
missing-tools = true
|
||||
#missing-tools = true
|
||||
|
Loading…
Reference in New Issue
Block a user