Commit 1d2d01ae authored by Chaoting Liu's avatar Chaoting Liu

[skip-ci] llvm stack: update to 10.0.0

parent 624b3ed8
Pipeline #6613 skipped
# Contributions from Arch:
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=clang
pkgver=8.0.1
pkgver=10.0.0
pkgrel=1
pkgdesc="C language family frontend for LLVM"
arch=('x86_64')
url="https://clang.llvm.org/"
license=('custom:University of Illinois/NCSA Open Source License')
license=('custom:Apache 2.0 with LLVM Exception')
depends=('llvm-libs' 'gcc' 'compiler-rt')
makedepends=('llvm' 'cmake' 'ninja' 'python3-sphinx' 'python2')
optdepends=('openmp: OpenMP support in clang with -fopenmp'
......@@ -17,73 +16,88 @@ optdepends=('openmp: OpenMP support in clang with -fopenmp'
provides=("clang-analyzer=$pkgver" "clang-tools-extra=$pkgver")
conflicts=('clang-analyzer' 'clang-tools-extra')
replaces=('clang-analyzer' 'clang-tools-extra')
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/cfe-$pkgver.src.tar.xz{,.sig}
https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-$pkgver.src.tar.xz{,.sig}
0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch
0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
0003-OpenCL-Fix-assertion-due-to-blocks.patch
clang-doc-build-as-clang_tool.patch
0001-Fix-uninitialized-value-in-ABIArgInfo.patch
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
$_source_base/clang-tools-extra-$pkgver.src.tar.xz{,.sig}
$_source_base/llvm-$pkgver.src.tar.xz{,.sig}
enable-SSP-and-PIE-by-default.patch)
sha256sums=('70effd69f7a8ab249f66b0a68aba8b08af52aa2ab710dfb8a0fba102685b1646'
sha256sums=('885b062b00e903df72631c5f98b9579ed1ed2790f74e5646b4234fa084eacb21'
'SKIP'
'187179b617e4f07bb605cc215da0527e64990b4a7dd5cbcc452a16b64e02c3e1'
'acdf8cf6574b40e6b1dabc93e76debb84a9feb6f22970126b04d4ba18b92911c'
'SKIP'
'44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7'
'df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf'
'SKIP'
'fbb6d3c8135942e458bcad8882605a623bcd09bdec488eb0800e3afee0061e3a'
'91c49139e02c6d29f6201aa394868939b991b39b84215c082392ea96fbd8c334'
'191434810b5298331908ea1e193203e8441693da900238344e946ee6a79dad31'
'1dfa5f93c0c084b8a25ca79ef9e2fe63a476826629e8ef366e0a6eaf5fa10625'
'b7f31bcf03255f6a9b51b02935648e015ea538a0eef0b0c6d9c052fc5accb0c4'
'58f86da25eb230ed6d423b5b61870cbf3bef88f38103ca676a2c7f34b2372171')
'9e557a18f3ca96cc5cc9b62d2e308b993025523b2aca0735248118a928c8c3ff')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
# Utilizing LLVM_DISTRIBUTION_COMPONENTS to avoid
# installing static libraries; inspired by Gentoo
_get_distribution_components() {
local target
ninja -t targets | grep -Po 'install-\K.*(?=-stripped:)' | while read -r target; do
case $target in
clang-libraries|distribution)
continue
;;
clang|clangd|clang-*)
;;
clang*|findAllSymbols)
continue
;;
esac
echo $target
done
}
prepare() {
cd "$srcdir/cfe-$pkgver.src"
cd "$srcdir/$pkgname-$pkgver.src"
mkdir build
mv "$srcdir/clang-tools-extra-$pkgver.src" tools/extra
patch -Np1 -i ../enable-SSP-and-PIE-by-default.patch
# The following patch was reverted upstream because it triggered an ICE with
# GCC 7; however, we need it to pass the test suite when building with GCC 9
# https://bugs.llvm.org/show_bug.cgi?id=40547
patch -Np1 -i ../0001-Fix-uninitialized-value-in-ABIArgInfo.patch
# Backported patches for intel-opencl-clang and intel-compute-runtime
patch -Np1 -i ../0001-OpenCL-Change-type-of-block-pointer-for-OpenCL.patch
patch -Np1 -i ../0002-OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
patch -Np1 -i ../0003-OpenCL-Fix-assertion-due-to-blocks.patch
# Fix inclusion of /usr/bin/clang-doc
patch -Np1 -d tools/extra <../clang-doc-build-as-clang_tool.patch
patch -Np2 -i ../enable-SSP-and-PIE-by-default.patch
if [[ $pkgver != 10.* ]]; then
echo "Remove libclangHandleLLVM hack!"
return 1
fi
# Remove libclangHandleLLVM; breaks zig (https://reviews.llvm.org/D75579)
sed -i '/add_clang_subdirectory(handle-llvm)/d' \
tools/clang-fuzzer/CMakeLists.txt
}
build() {
cd "$srcdir/cfe-$pkgver.src/build"
cmake .. -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DBUILD_SHARED_LIBS=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_BUILD_TESTS=OFF \
-DLLVM_INCLUDE_DOCS=ON \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
cd "$srcdir/$pkgname-$pkgver.src/build"
local cmake_args=(
-G Ninja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/usr
-DPYTHON_EXECUTABLE=/usr/bin/python3
-DLLVM_LINK_LLVM_DYLIB=ON
-DCLANG_LINK_CLANG_DYLIB=ON
-DLLVM_ENABLE_RTTI=ON
-DLLVM_BUILD_TESTS=ON
-DLLVM_INCLUDE_DOCS=ON
-DLLVM_BUILD_DOCS=ON
-DLLVM_ENABLE_SPHINX=ON
-DSPHINX_WARNINGS_AS_ERRORS=OFF
-DLLVM_EXTERNAL_LIT=/usr/bin/lit
-DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src"
)
cmake .. "${cmake_args[@]}"
local distribution_components=$(_get_distribution_components | paste -sd\;)
test -n "$distribution_components"
cmake_args+=(-DLLVM_DISTRIBUTION_COMPONENTS="$distribution_components")
cmake .. "${cmake_args[@]}"
ninja
}
#check() {
# cd "$srcdir/cfe-$pkgver.src/build"
# ninja check-clang{,-tools}
#}
check() {
cd "$srcdir/$pkgname-$pkgver.src/build"
ninja check-clang{,-tools}
}
_python2_optimize() {
python2 -m compileall "$@"
......@@ -97,9 +111,9 @@ _python3_optimize() {
}
package() {
cd "$srcdir/cfe-$pkgver.src/build"
cd "$srcdir/$pkgname-$pkgver.src/build"
DESTDIR="$pkgdir" ninja install
DESTDIR="$pkgdir" ninja install-distribution
install -Dm644 ../LICENSE.TXT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Remove documentation sources
......@@ -125,3 +139,5 @@ package() {
_python2_optimize "$pkgdir/usr/share/clang"
_python3_optimize "$pkgdir/usr/share" -x 'clang-include-fixer|run-find-all-symbols'
}
# vim:set ts=2 sw=2 et:
This diff is collapsed.
# Contributions from Arch:
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=compiler-rt
pkgver=8.0.1
pkgrel=2
pkgver=10.0.0
pkgrel=1
pkgdesc="Compiler runtime libraries for clang"
arch=('x86_64')
url="https://compiler-rt.llvm.org/"
license=('custom:University of Illinois/NCSA Open Source License')
license=('custom:Apache 2.0 with LLVM Exception')
depends=('gcc-libs')
makedepends=('llvm' 'cmake' 'ninja' 'python3')
# Build 32-bit compiler-rt libraries on x86_64 (FS#41911)
makedepends_x86_64=('lib32-gcc-libs')
options=('staticlibs')
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig})
sha256sums=('11828fb4823387d820c6715b25f6b2405e60837d12a7469e7a8882911c721837'
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig})
sha256sums=('6a7da64d3a0a7320577b68b9ca4933bdcab676e898b759850e827333c3282c75'
'SKIP')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
......@@ -44,3 +44,5 @@ package() {
mv "$pkgdir"/usr/lib/{linux,clang/$pkgver/lib/}
mv "$pkgdir"/usr/{share/*.txt,lib/clang/$pkgver/share/}
}
# vim:set ts=2 sw=2 et:
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=lld
pkgver=8.0.1
pkgrel=2
pkgver=10.0.0
pkgrel=1
pkgdesc="Linker from the LLVM project"
arch=('x86_64')
url="https://lld.llvm.org/"
license=('custom:University of Illinois/NCSA Open Source License')
depends=(llvm-libs=$pkgver)
makedepends=("llvm=$pkgver" 'cmake' 'ninja' 'python3-sphinx')
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig}
https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-$pkgver.src.tar.xz{,.sig})
sha256sums=('9fba1e94249bd7913e8a6c3aadcb308b76c8c3d83c5ce36c99c3f34d73873d88'
license=('custom:Apache 2.0 with LLVM Exception')
depends=('llvm-libs')
makedepends=('llvm' 'cmake' 'ninja' 'python3-sphinx')
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
$_source_base/llvm-$pkgver.src.tar.xz{,.sig}
sphinx2.patch)
sha256sums=('b9a0d7c576eeef05bc06d6e954938a01c5396cee1d1e985891e0b1cf16e3d708'
'SKIP'
'df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf'
'SKIP'
'44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7'
'SKIP')
'7f7cca66a16c5a4aca132bfa1d86a7a2ff33612ec47d3422dc91ad4cc1810646')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
validpgpkeys+=('474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard <tstellar@redhat.com>
prepare() {
cd "$srcdir/$pkgname-$pkgver.src"
mkdir build
# https://bugs.llvm.org/show_bug.cgi?id=41789
patch -Np1 -i ../sphinx2.patch
}
build() {
......@@ -28,7 +37,6 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DBUILD_SHARED_LIBS=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INCLUDE_TESTS=ON \
-DLLVM_BUILD_TESTS=ON \
......@@ -39,6 +47,11 @@ build() {
ninja
}
check() {
cd "$srcdir/$pkgname-$pkgver.src/build"
ninja check-lld
}
package() {
cd "$srcdir/$pkgname-$pkgver.src/build"
......@@ -48,4 +61,5 @@ package() {
# Remove documentation sources
rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
}
# vim:set ts=2 sw=2 et:
diff --git a/docs/conf.py b/docs/conf.py
index 62404b275..b5a3cdc68 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -134,7 +134,7 @@ html_last_updated_fmt = '%Y-%m-%d'
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
-html_sidebars = {'index': 'indexsidebar.html'}
+html_sidebars = {'index': ['localtoc.html', 'relations.html', 'sourcelink.html', 'indexsidebar.html', 'searchbox.html']}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#llvm now split to different packages
#
#- llvm, llvm-libs (in dir llvm/): the main llvm lib and functional part
#- lld: (dynamic) linker of llvm
#- lldb: debugger of llvm
#- compiler-rt: runtime compiler lib for clang to build and run
#- clang: C/C++ compiler from llvm project
#
#they should stay in same release version
#the update sequence is:
#(optional ocaml group->) llvm -> lld -> compiler-rt -> clang
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
pkgname=('llvm' 'llvm-libs' 'llvm-ocaml')
pkgver=8.0.1
pkgrel=2
_ocaml_ver=4.08.0
pkgver=10.0.0
pkgrel=1
_ocaml_ver=4.09.1
arch=('x86_64')
url="https://llvm.org/"
license=('custom:University of Illinois/NCSA Open Source License')
makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2' 'python3-sphinx'
"ocaml=$_ocaml_ver" 'ocaml-ctypes' 'ocaml-findlib' 'python3-recommonmark')
license=('custom:Apache 2.0 with LLVM Exception')
makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
"ocaml=$_ocaml_ver" 'ocaml-ctypes' 'ocaml-findlib'
'python-sphinx' 'python-recommonmark')
options=('staticlibs')
source=(https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/$pkgname-$pkgver.src.tar.xz{,.sig}
llvm-config.h)
sha256sums=('44787a6d02f7140f145e2250d56c9f849334e11f9ae379827510ed72f12b75e7'
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/$pkgname-$pkgver.src.tar.xz{,.sig}
llvm-config.h)
sha256sums=('df83a44b3a9a71029049ec101fb0077ecbbdf5fe41e395215025779099a98fdf'
'SKIP'
'597dc5968c695bbdbb0eac9e8eb5117fcd2773bc91edf5ec103ecffffab8bc48')
validpgpkeys+=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
......@@ -45,32 +38,19 @@ build() {
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR \
-DLLVM_BUILD_TESTS=ON \
-DLLVM_BUILD_DOCS=ON \
-DLLVM_ENABLE_SPHINX=ON \
-DLLVM_ENABLE_DOXYGEN=OFF \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \
-DLLVM_BINUTILS_INCDIR=/usr/include
ninja all ocaml_doc
}
check() {
cd "$srcdir/llvm-$pkgver.src/build"
ninja check | true
# Failing Tests (9):
# LLVM :: tools/llvm-rc/codepage.test
# LLVM :: tools/llvm-rc/parser-expr.test
# LLVM :: tools/llvm-rc/parser.test
# LLVM :: tools/llvm-rc/tag-accelerators.test
# LLVM :: tools/llvm-rc/tag-dialog.test
# LLVM :: tools/llvm-rc/tag-icon-cursor.test
# LLVM :: tools/llvm-rc/tag-menu.test
# LLVM :: tools/llvm-rc/tag-stringtable.test
# LLVM :: tools/llvm-rc/tag-versioninfo.test
ninja check
}
package_llvm() {
......@@ -82,7 +62,7 @@ package_llvm() {
DESTDIR="$pkgdir" ninja install
# Include lit for running tests with clang and friends
# Include lit for running lit-based tests in other projects
pushd ../utils/lit
python3 setup.py install --root="$pkgdir" -O1
popd
......@@ -91,7 +71,7 @@ package_llvm() {
rm -r "$pkgdir"/usr/share/doc/$pkgname/html/{_sources,.buildinfo}
# The runtime libraries go into llvm-libs
mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO}*.so* "$srcdir"
mv -f "$pkgdir"/usr/lib/lib{LLVM,LTO,Remarks}*.so* "$srcdir"
mv -f "$pkgdir"/usr/lib/LLVMgold.so "$srcdir"
# OCaml bindings go to a separate package
......@@ -115,7 +95,7 @@ package_llvm-libs() {
install -d "$pkgdir/usr/lib"
cp -P \
"$srcdir"/lib{LLVM,LTO}*.so* \
"$srcdir"/lib{LLVM,LTO,Remarks}*.so* \
"$srcdir"/LLVMgold.so \
"$pkgdir/usr/lib/"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment