summaryrefslogtreecommitdiff
path: root/sys-devel/llvm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-23 20:48:53 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-23 20:48:53 +0000
commit51536d2fe4697ba9114d611178bb9e20d3d5b729 (patch)
tree30b91d98e65985a575940ed49e756697c1f049c2 /sys-devel/llvm
parent4ab6db5717ef23f29320d4c6fb9ebdb8dec1f193 (diff)
gentoo resync : 23.12.2017
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/Manifest5
-rw-r--r--sys-devel/llvm/files/5.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch71
-rw-r--r--sys-devel/llvm/llvm-5.0.1.ebuild8
-rw-r--r--sys-devel/llvm/llvm-5.0.9999.ebuild230
4 files changed, 7 insertions, 307 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 335942b3f01c..4c5d79a0e21f 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -1,5 +1,4 @@
AUX 4.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch 2408 BLAKE2B 92f396663629d0f1bc65833d4050f8e28044c25dec961981edac768b374c543d9084eb70ac51435554acfc5430c45035e4acae6e02f453bc679a3458979b53f3 SHA512 0424f35f12054a7e3e20d948c714979cfcf01200e8aac1cfab1b9fdd08718b4f4143a635eca9500e7ac77993ff390358cb630b8d97029cd9ec1e14c9cfaedfd2
-AUX 5.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch 3055 BLAKE2B 4087d3b68bfb2023ef0dc43aaa696ed12b02c776e702e1aaa6a32b6c44f9194df7e8bb78068f03cd23165ba5ad8f9b2451a228a9b77c0b2c08757fc660eb2e00 SHA512 2493369dfc8bee58c8f92215aba9b91fb718562f9fa040c1132269e538040e9baa3c0a50e888033c3805a1aa7ce40443c6e7ff52ecc791b8c86140cd34b3f751
AUX 9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch 2626 BLAKE2B 6c3afe6941568119b6bbce1c66be913a29a2ac7853a881804c1c22e981075f1677ca7e4744738ad858f58a58c1a7295aeb5f1d87b3a2b2adfb971a54d76c04fb SHA512 34a84427c34fa8886f55e05cf0ffce258cdee8e98190e070eb40dc555a30784c49ebe4f946f7ea51b7d00fceb8071fc745007250dc5b5a61c4d2bb9910672ec5
AUX 9999/musl-fixes.patch 1258 BLAKE2B fe275412bc908884239ea71de9a9ddf1d2f64debaa1a9ada18170195a7775c41571600ed3666343bf967aff5f9117900f73155f60de5077bc4584cfc2f782f53 SHA512 314dcbe846a66312c9f1634f4ff3f4670b3db1d3210bb550f1d3877a423333ba042da2e90c8736918a36be4d4faf58dab8d3236d4f26df5af7f7f019b0e0ec8f
DIST cfe-3.4.2.src.tar.gz 10612313 BLAKE2B 6a5d9f20d181b217f3ca72b6585bd953150cc0d207a203feb24aa9cb9b2e341ac6a2e152a1c40baf2d53e5a52c4e4e86a518a329bdda39c08986b3437b04cee8 SHA512 e01fa8e312e9b3b7b3cb572ac21349161aaa50078ecfe7bded273b75db4a0c44acde524f8fdfcbeec54c61eeeb8339e9917d1f205a8fda18e34fe7ccbe89c36d
@@ -34,6 +33,7 @@ DIST llvm-3.9.1.src.tar.xz 18130436 BLAKE2B 90afd2c06e612132bbc84c29fed59abdfdae
DIST llvm-4.0.1.src.tar.xz 21065652 BLAKE2B 6327eed2d1feb108440f22d2581d1ff86c10a10c29793538d8d899c7e2dc83d3f7b147d3fd4bcce2bd2bf57c071b08c624aeafe40a3e7a3914506e7751727e6c SHA512 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
DIST llvm-5.0.0.src.tar.xz 23411980 BLAKE2B bc3d8b75b766c83912252b51d6b57c8151c9d83415eff7bc771923d35138ed253a788d6c8e0a384c5e78ce1a1065f10d66ef5004df163b4c3b0c6274bb3aa6b7 SHA512 e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a
DIST llvm-5.0.1-manpages.tar.bz2 94004 BLAKE2B 34eb29361ad7aa881e64d1dd2992fd89ce44adafd2521284c27b6ffe7082bc7e70458204e6f34d582b704bf7c5dad93c6a6dc41fc7abc41862aab8f5ec53ed07 SHA512 3444cc8e06009f5dd2669b92af662a1049d9294c8ca0dcf45486e1dc1aaf10160860b7856d30ad70bbe5864b21d1539316e89f5237549f5653954e23baf64334
+DIST llvm-5.0.1-patchset.tar.bz2 4204 BLAKE2B e7282e84578631d88549bdf34e5a44e0294e47ef1fee29c0cb954d7afd160d4b6a0f39bb3bd53791ea53503a60eaa0ada0a512a63d696ff096dc6f21f4aecdc7 SHA512 395ea2b13008e222c034e2bdd8c2bb033b9c01e61fb89c840f009f6cddb499b317df8b061d29f40968d8f0df5540a2f4a9de31eef1de886796c8c334f37254eb
DIST llvm-5.0.1.src.tar.xz 23428720 BLAKE2B 3db4d33df21018d17eef0042c0d8d82a8412bd5daa99cfb5405a6ec83c5774178fa76b220e8731c2a9a64dabf898aa90fe29c685327bd63a4f078e8e94a9a77e SHA512 bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b5366172c4aad46592dfd8afe372349ecf264f581463d017f9cee2d63c1cb
DIST llvm-manpages-4.0.1.tar.bz2 87981 BLAKE2B 79ffd254ee5c6e09159c954913ef820f74107d4fcea5e3ed82592dc36af8fdfbf1e850547ba8bfc20aa9a5ecdd26c50329e6a6d558ae3aa5475a930789ce3e01 SHA512 d5b3213567c25db58ef364d272314a79c311a80fc21d98c09a5540af45a8190a38f489228663fe9a9b63bf0f2b952c460c4196a8fc8d6f221619f6e7ed2fc415
DIST llvm-manpages-5.0.0.tar.bz2 94240 BLAKE2B 1657edefa2e839f401b7c30ba1c0cfde45bcb0fa9bcfc3ea6070bc0addc237be898c5a79e54b2120f98b2a9550ab286cfd0bc835751a4e8cc30005d4081fb9f9 SHA512 0bccfb00caa0796bed8ea4e591616e025e43d304f05589180820c17f8567fa3a1f1f76c323098ed0d0e4590765415b1c1c272a94c6e2e7544788f4088ef0ffea
@@ -44,7 +44,6 @@ EBUILD llvm-3.7.1-r3.ebuild 16958 BLAKE2B fd7a7890b0041c216fe4b21937a578b2a00da2
EBUILD llvm-3.9.1-r1.ebuild 16507 BLAKE2B 83692ac24d5df082c1eab87ef85353a44a485332fa5720414a5965d379939e82aa6bfccb2fb513bc8c18872184d4ef99a02dc4766dad5bd555f887b2a9122589 SHA512 1234349f89c1d2b07e1918075b52f2866e56cc742d3f3da233dd8465c559c765c7cb256f1d6eb77ee61fede9be2c84bd6236c42e5672d5130f0e7730ee24de96
EBUILD llvm-4.0.1-r1.ebuild 6761 BLAKE2B 62f83ec333027a67e3635dbde1cb324b08819fd22491591b39dd3cd57930790df2ef117b6cbce56ce2db04789773d0f3cd71d93e64bfc12d35bc7bd60f15d8d8 SHA512 d32f436e48854839f6ec146c4a1d0f44f15f3e73563c33eef370b62049142401bf6aabbf2cd96f6f550ef2e05c220cc5abbbb486b062d85b268c2885666d9fbe
EBUILD llvm-5.0.0.ebuild 6802 BLAKE2B cdaba58a9e17e67d239c931fc7f2e93464b341772fa806fc776b2010f17f1d40251616f11222c753a2c6b7689b18dba2c1189ef242b581e1989eee4b876e8146 SHA512 35d8e14da0f5a1baa60643e3c04663eb044201665ef2ff0faf53ab98f6c5634ff5f099e11d9d3d02a0f16a051540829ee275e1099b6652f7a25469480f617dee
-EBUILD llvm-5.0.1.ebuild 6888 BLAKE2B c566e61b4c16c7cc4e2ea3c8f7f485480bea994657d910e6c937f8d95ea819078585a65cf048d3e412e4fa7352e2f640f7681efb012880312191513114bf39ed SHA512 f27f579a6030a06d6dd810447a135c1a3337372496a00dfb93eeb6238d1a6f6fa0120d0eea467092817b67925962ea34f539e27427f3f1bc71ab98587f1414ff
-EBUILD llvm-5.0.9999.ebuild 6667 BLAKE2B 05cc207eddb9088d1f85c85c4dcc6657f62eb33b05f3a2ec9116260e0431fee2019045ba554d1f14c9214cf84bfa24030fb8119e64181bbff1471dc67ae7e3c0 SHA512 166611b3896cbeb91db37851fe61939cea7a86b31e8c1f86eaf0446cfdb213b870f08e812c675edd090bc47fb3e35db8fe0e813e3fee2c266881f9f32535d7e2
+EBUILD llvm-5.0.1.ebuild 6985 BLAKE2B 60d2a1b0711f611c336343cc7f99302c3dbaad37df9a7be37cb0b92be9f6020c3795e94ea2120510af66d35b00a37e860a6777eba33846b67206a2009747d9c8 SHA512 5988422fc72edf517360123b7e383af24c10099d6f65133fda9af9e89aae6d4fdbf75ae47a88f9413ba200037935670fe1260710503d765a16dc6a0f88d19509
EBUILD llvm-9999.ebuild 6662 BLAKE2B 1fc2fd66640cb3fd433bc355f880f8718535b5c500726cf121f70aae87708dc4068ed0c3fbecb61ab86c813d3808411d657c492e22e492518a7b3cf04a2bc953 SHA512 3abb4a1a689994902cdf8eef9bdb60214f6a5482c7cefe8ee0eacdb8e0c5d0db3c3d1b63ac04862194ca7a7de3b22f9d8db30c6f40a55c72c3b61f5b8ee76a04
MISC metadata.xml 2747 BLAKE2B 0684b3ae235b762c8c365ac0da29d285781cb7aae25250664704385c3326c07097a6061907b1bc2417b90db39745745bfbbab887d53a7fa1024e62bcded2d0be SHA512 cbb82ddab3a19f9103ed1f72bdae2b50dd3bd906b377ff6004dc7b85e9ec8852fd9d03f7f9e7015363454b86680ec5fdb756b08bc6a7c2743669ee4ff3b4aa08
diff --git a/sys-devel/llvm/files/5.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch b/sys-devel/llvm/files/5.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch
deleted file mode 100644
index 21702748893c..000000000000
--- a/sys-devel/llvm/files/5.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 937b23b5fffa59deb1dc342cc5602d387d84a762 Mon Sep 17 00:00:00 2001
-From: Michal Gorny <mgorny@gentoo.org>
-Date: Mon, 27 Nov 2017 22:23:09 +0000
-Subject: [PATCH] [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading
-
-Prevent unloading shared libraries on Linux when dlclose() is called.
-This is necessary since command-line option parsing API relies on
-registering the global option instances in the option parser instance
-which can be loaded in a different shared library.
-
-Given that we can't reliably remove those options when a library is
-unloaded, the parser ends up containing dangling references. Since glibc
-has relatively complex library unloading rules, some of the LLVM
-libraries can be unloaded while others (including the Support library)
-stay loaded causing quite a mayhem. To reliably prevent that, just
-forbid unloading all libraries -- it's a very bad idea anyway.
-
-While the issue arguably happens only with BUILD_SHARED_LIBS, it may
-affect any library reusing llvm::cl interface.
-
-Based on patch provided Ross Hayward on https://bugs.gentoo.org/617154.
-Previously hit by Fedora back in Feb 2016:
-https://lists.freedesktop.org/archives/mesa-dev/2016-February/107242.html
-
-Differential Revision: https://reviews.llvm.org/D40459
-
-git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319105 91177308-0d34-0410-b5e6-96231b3b80d8
----
- cmake/modules/HandleLLVMOptions.cmake | 8 ++++++++
- unittests/Support/DynamicLibrary/CMakeLists.txt | 7 +++++++
- 2 files changed, 15 insertions(+)
-
-diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
-index c5390371845..b5059a8a60e 100644
---- a/cmake/modules/HandleLLVMOptions.cmake
-+++ b/cmake/modules/HandleLLVMOptions.cmake
-@@ -151,6 +151,14 @@ if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
- endif()
-
-+# Pass -Wl,-z,nodelete. This makes sure our shared libraries are not unloaded
-+# by dlclose(). We need that since the CLI API relies on cross-references
-+# between global objects which became horribly broken when one of the libraries
-+# is unloaded.
-+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,nodelete")
-+endif()
-+
-
- function(append value)
- foreach(variable ${ARGN})
-diff --git a/unittests/Support/DynamicLibrary/CMakeLists.txt b/unittests/Support/DynamicLibrary/CMakeLists.txt
-index 9355979221a..c6201b1ad31 100644
---- a/unittests/Support/DynamicLibrary/CMakeLists.txt
-+++ b/unittests/Support/DynamicLibrary/CMakeLists.txt
-@@ -24,5 +24,12 @@ function(dynlib_add_module NAME)
- add_dependencies(DynamicLibraryTests ${NAME})
- endfunction(dynlib_add_module)
-
-+# Revert -Wl,-z,nodelete on this test since it relies on the file
-+# being unloaded.
-+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-+ string(REPLACE "-Wl,-z,nodelete" "" CMAKE_SHARED_LINKER_FLAGS
-+ ${CMAKE_SHARED_LINKER_FLAGS})
-+endif()
-+
- dynlib_add_module(PipSqueak)
- dynlib_add_module(SecondLib)
---
-2.15.1
-
diff --git a/sys-devel/llvm/llvm-5.0.1.ebuild b/sys-devel/llvm/llvm-5.0.1.ebuild
index ca00fa16d34d..07f074168c8d 100644
--- a/sys-devel/llvm/llvm-5.0.1.ebuild
+++ b/sys-devel/llvm/llvm-5.0.1.ebuild
@@ -14,6 +14,7 @@ inherit cmake-utils eapi7-ver flag-o-matic multilib-minimal \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
SRC_URI="https://releases.llvm.org/${PV/_//}/${P/_/}.src.tar.xz
+ https://dev.gentoo.org/~mgorny/dist/llvm/${P}-patchset.tar.bz2
!doc? ( https://dev.gentoo.org/~mgorny/dist/llvm/${P}-manpages.tar.bz2 )"
# Keep in sync with CMakeLists.txt
@@ -75,9 +76,10 @@ src_prepare() {
# https://bugs.gentoo.org/show_bug.cgi?id=565358
eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
- # Backport the fix for dlclose() causing option parser mess
- # e.g. https://bugs.gentoo.org/617154
- eapply "${FILESDIR}"/5.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch
+ # Apply the backported patches
+ eapply "${WORKDIR}/${P}-patchset"
+ # Copy the new binary file (we don't support git binary patches)
+ cp {"${WORKDIR}/${P}-patchset",.}/test/tools/llvm-symbolizer/Inputs/print_context.o || die
# disable use of SDK on OSX, bug #568758
sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
diff --git a/sys-devel/llvm/llvm-5.0.9999.ebuild b/sys-devel/llvm/llvm-5.0.9999.ebuild
deleted file mode 100644
index f41a0c96c02a..000000000000
--- a/sys-devel/llvm/llvm-5.0.9999.ebuild
+++ /dev/null
@@ -1,230 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-: ${CMAKE_MAKEFILE_GENERATOR:=ninja}
-# (needed due to CMAKE_BUILD_TYPE != Gentoo)
-CMAKE_MIN_VERSION=3.7.0-r1
-PYTHON_COMPAT=( python2_7 )
-
-inherit cmake-utils eapi7-ver flag-o-matic git-r3 multilib-minimal \
- pax-utils python-any-r1 toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-SRC_URI=""
-EGIT_REPO_URI="https://git.llvm.org/git/llvm.git
- https://github.com/llvm-mirror/llvm.git"
-EGIT_BRANCH="release_50"
-
-# Keep in sync with CMakeLists.txt
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC Sparc SystemZ X86 XCore )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-
-# Additional licenses:
-# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
-# 2. ARM backend: LLVM Software Grant by ARM.
-# 3. MD5 code: public-domain.
-# 4. Tests (not installed):
-# a. gtest: BSD.
-# b. YAML tests: MIT.
-
-LICENSE="UoI-NCSA rc BSD public-domain
- llvm_targets_ARM? ( LLVM-Grant )"
-SLOT="$(ver_cut 1)"
-KEYWORDS=""
-IUSE="debug doc gold libedit +libffi ncurses test
- kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=
- gold? ( >=sys-devel/binutils-2.22:*[cxx] )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=virtual/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )"
-# configparser-3.2 breaks the build (3.3 or none at all are fine)
-DEPEND="${RDEPEND}
- dev-lang/perl
- || ( >=sys-devel/gcc-3.0 >=sys-devel/llvm-3.5
- ( >=sys-freebsd/freebsd-lib-9.1-r10 sys-libs/libcxx )
- )
- || ( >=sys-devel/binutils-2.18 >=sys-devel/binutils-apple-5.1 )
- kernel_Darwin? ( <sys-libs/libcxx-$(ver_cut 1-3).9999 )
- doc? ( dev-python/sphinx )
- gold? ( sys-libs/binutils-libs )
- libffi? ( virtual/pkgconfig )
- !!<dev-python/configparser-3.3.0.2
- ${PYTHON_DEPS}"
-# There are no file collisions between these versions but having :0
-# installed means llvm-config there will take precedence.
-RDEPEND="${RDEPEND}
- !sys-devel/llvm:0"
-PDEPEND="sys-devel/llvm-common
- gold? ( sys-devel/llvmgold )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}
- || ( ${ALL_LLVM_TARGETS[*]} )"
-
-# least intrusive of all
-CMAKE_BUILD_TYPE=RelWithDebInfo
-
-src_prepare() {
- # Fix llvm-config for shared linking and sane flags
- # https://bugs.gentoo.org/show_bug.cgi?id=565358
- eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch
-
- # Backport the fix for dlclose() causing option parser mess
- # e.g. https://bugs.gentoo.org/617154
- eapply "${FILESDIR}"/5.0.1/0001-cmake-Pass-Wl-z-nodelete-on-Linux-to-prevent-unloadi.patch
-
- # disable use of SDK on OSX, bug #568758
- sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
-
- # User patches + QA
- cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
- local ffi_cflags ffi_ldflags
- if use libffi; then
- ffi_cflags=$($(tc-getPKG_CONFIG) --cflags-only-I libffi)
- ffi_ldflags=$($(tc-getPKG_CONFIG) --libs-only-L libffi)
- fi
-
- local libdir=$(get_libdir)
- local mycmakeargs=(
- # disable appending VCS revision to the version to improve
- # direct cache hit ratio
- -DLLVM_APPEND_VC_REV=OFF
- -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/${SLOT}"
- -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-
- -DBUILD_SHARED_LIBS=ON
- -DLLVM_TARGETS_TO_BUILD="${LLVM_TARGETS// /;}"
- -DLLVM_BUILD_TESTS=$(usex test)
-
- -DLLVM_ENABLE_FFI=$(usex libffi)
- -DLLVM_ENABLE_LIBEDIT=$(usex libedit)
- -DLLVM_ENABLE_TERMINFO=$(usex ncurses)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
-
- -DWITH_POLLY=OFF # TODO
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
-
- # disable OCaml bindings (now in dev-ml/llvm-ocaml)
- -DOCAMLFIND=NO
- )
-
-# Note: go bindings have no CMake rules at the moment
-# but let's kill the check in case they are introduced
-# if ! multilib_is_native_abi || ! use go; then
- mycmakeargs+=(
- -DGO_EXECUTABLE=GO_EXECUTABLE-NOTFOUND
- )
-# fi
-
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=$(usex doc)
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=$(usex doc)
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
- use doc && mycmakeargs+=(
- -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
- -DSPHINX_WARNINGS_AS_ERRORS=OFF
- )
- use gold && mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- if tc-is-cross-compiler; then
- local tblgen="${EPREFIX}/usr/lib/llvm/${SLOT}/bin/llvm-tblgen"
- [[ -x "${tblgen}" ]] \
- || die "${tblgen} not found or usable"
- mycmakeargs+=(
- -DCMAKE_CROSSCOMPILING=ON
- -DLLVM_TABLEGEN="${tblgen}"
- )
- fi
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
-
- pax-mark m "${BUILD_DIR}"/bin/llvm-rtdyld
- pax-mark m "${BUILD_DIR}"/bin/lli
- pax-mark m "${BUILD_DIR}"/bin/lli-child-target
-
- if use test; then
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/Orc/OrcJITTests
- pax-mark m "${BUILD_DIR}"/unittests/ExecutionEngine/MCJIT/MCJITTests
- pax-mark m "${BUILD_DIR}"/unittests/Support/SupportTests
- fi
-}
-
-multilib_src_test() {
- # respect TMPDIR!
- local -x LIT_PRESERVES_TMP=1
- cmake-utils_src_make check
-}
-
-src_install() {
- local MULTILIB_CHOST_TOOLS=(
- /usr/lib/llvm/${SLOT}/bin/llvm-config
- )
-
- local MULTILIB_WRAPPED_HEADERS=(
- /usr/include/llvm/Config/llvm-config.h
- )
-
- local LLVM_LDPATHS=()
- multilib-minimal_src_install
-
- # move wrapped headers back
- mv "${ED%/}"/usr/include "${ED%/}"/usr/lib/llvm/${SLOT}/include || die
-}
-
-multilib_src_install() {
- cmake-utils_src_install
-
- # move headers to /usr/include for wrapping
- rm -rf "${ED%/}"/usr/include || die
- mv "${ED%/}"/usr/lib/llvm/${SLOT}/include "${ED%/}"/usr/include || die
-
- # install fuzzer libraries for clang (cmake rules were added in 6)
- # https://bugs.gentoo.org/636840
- into "/usr/lib/llvm/${SLOT}"
- dolib.a "$(get_libdir)"/libLLVMFuzzer*.a
-
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
-}
-
-multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
- cat <<-_EOF_ > "${T}/10llvm-${revord}" || die
- PATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- # we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
-_EOF_
- doenvd "${T}/10llvm-${revord}"
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
-}