summaryrefslogtreecommitdiff
path: root/sys-devel/llvm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /sys-devel/llvm
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/Manifest15
-rw-r--r--sys-devel/llvm/files/11.0.0/0001-backport-D88371-guard-find_library-tensorflow_c_api.patch55
-rw-r--r--sys-devel/llvm/llvm-10.0.1.ebuild53
-rw-r--r--sys-devel/llvm/llvm-11.0.0.9999.ebuild54
-rw-r--r--sys-devel/llvm/llvm-11.0.0.ebuild (renamed from sys-devel/llvm/llvm-11.0.0_rc3.ebuild)62
-rw-r--r--sys-devel/llvm/llvm-11.0.0_rc4.ebuild503
-rw-r--r--sys-devel/llvm/llvm-12.0.0.9999.ebuild59
7 files changed, 212 insertions, 589 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 32282d709935..8fac45f0da44 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -1,19 +1,20 @@
AUX 10.0.1/0001-llvm-Avoid-linking-llvm-cfi-verify-to-duplicate-libs.patch 1480 BLAKE2B 09057d1e7ad466ba316335b66d9acf7b55fabdb209bddf7d28e641ea7a922d8af51ad6a8f0ab41b28da7ff0e76148d5ea388ad447bcd828f11ad3e7d89d0f78d SHA512 366041f1c4a4d7c3af2b611f65b238cb0bd00806ad0afa1181f05900b512a84c8997b2f2843564a573478af2e7b225d6ccc7ffe7823d88acd2ede706bee49ffa
AUX 10.0.1/0002-llvm-Disable-linking-llvm-exegesis-to-dylib.patch 983 BLAKE2B af7f06cf16ed45d446c7f879ccdc2d6ef50cd5e04f5eec40a2097f429063daeef610945e5201cb937349c041fc7d124df11319b253b4ea89f6b7baf701924ec9 SHA512 b39c0fc939d56cd6bb96b107d93cda23b01b76f51639000cf7b5516792c7bfcafbee56c0845b87cc30d172fa90f9fb2bdf137a5b27da272d405acec32bcc5b8d
+AUX 11.0.0/0001-backport-D88371-guard-find_library-tensorflow_c_api.patch 2450 BLAKE2B b070b1b90e63eda30caceda63076f44e7d72c41567b28f56ccaebffbb7b832cac72c2d444007988f5e535173eb961ba23b56d6e50a8bcbe18dbcf751527cb876 SHA512 c10f7fff5f951ef17a77c25ec85072e06a1cd672720cf2a3a5c72102f0968ee2123bf02fdcd5df41b7832564891ace6dd58ce5370c42f6be5e52c72780f2abfa
AUX 9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch 1188 BLAKE2B 72311a8da991b9f3b98523baefe6f5b31aa7f9101c388f35484dd5f384a08e838ea42a17447ca17a0dfe6b7d3c20abbdf0e8afee72e8ad5d46ec38b8d55307c8 SHA512 0ada997db2a0eb875105fb212dc3fc3077b9c4f7804d78c33c4b1f512bf1267295f325153ae14c00404c86e576ae1c78a6aeb0a57d1d4525aabd1169c21806ef
AUX 9999/musl-fixes.patch 1258 BLAKE2B fe275412bc908884239ea71de9a9ddf1d2f64debaa1a9ada18170195a7775c41571600ed3666343bf967aff5f9117900f73155f60de5077bc4584cfc2f782f53 SHA512 314dcbe846a66312c9f1634f4ff3f4670b3db1d3210bb550f1d3877a423333ba042da2e90c8736918a36be4d4faf58dab8d3236d4f26df5af7f7f019b0e0ec8f
DIST llvm-10.0.0-manpages.tar.bz2 177084 BLAKE2B 16b38e60fce4d67ac602b317ea7089c095d46b9426ba9940041e65d7ab493f85dba2e94a4aeba7b7c52042f23825efcfcd32a57d306aaf05b4307061a5a8a368 SHA512 eac57ad218ff4c2b5a74e453a29192ee6e911152b668d8a9420b59529d5cae8aa241f2485b4a7ea304acbecc7ecb27391a77552080726432c2b7b59b95fc0bd7
+DIST llvm-10.0.1-manpages.tar.bz2 180157 BLAKE2B ddf5951c8f5a2a8a80726fd713e6c818c852851a2261e904b484afdb67ac55f2ce10976ca2ca5d81fe2bf4806a72cc7b59f4068741306491a4f39065ca8fb56e SHA512 d3c2470dbd0f3143d64b380f7534ebcacdcf4bc4f140a6014283150007fe615ebd86247cf13b2432165a681614849e8eaab69a8d077f7a51e4e040e28ed33ebc
+DIST llvm-11.0.0-manpages.tar.bz2 179592 BLAKE2B d03dff5e7426f4c648d6112dee0fa7a91edf41584290c94c3f738fc65fa82fc6ef47b49c245fb0e741bdf267fc64534311194c476ece4b447649ba2250e61430 SHA512 1cf598f50c99a85a35b03398e4768cd1eafec9d602f788d401120adb91b3b59965216ed7102da26b7c2af7e1bbca4bca8f1d43bb687fcd8ed418e2f7076bdce4
DIST llvm-9.0.0-manpages.tar.bz2 158546 BLAKE2B eed6235698a0b5993affe305f7fd22cd4cf444adf931275a1685f2049a5f17cf2933907577d9ce142348a3c579769b0436aa2b5a9a953958504125a8c3e83b7d SHA512 64c8d18061eb2870b379a1df485be0b61eac07cb10b3f97347b54b2ee326faa63437ca04466776be282e120dd3f6147e14fffdd38ca370db85748fe5eb54d764
DIST llvmorg-10.0.0.tar.gz 120804856 BLAKE2B 6b0254f5b913398cdcf2b2ec1ff219888706d2b79d5296590934714e42ac79f6a6547941ac2b1d2c4e6313dd18b6c7068e748aa6ac033e49fccbf5d355aa8191 SHA512 baa182d62fef1851836013ae8a1a00861ea89769778d67fb97b407a9de664e6c85da2af9c5b3f75d2bf34ff6b00004e531ca7e4b3115a26c0e61c575cf2303a0
DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
-DIST llvmorg-11.0.0-rc3.tar.gz 122766783 BLAKE2B 052fdc864fed52692141284ebdc41d52d21fbeaf24ac5ed3e67701537baa683bae61b1c06de68322e0578a27a1f5a8856088cdc001d2b8d34d2ec88ae65ff739 SHA512 a28ce74775373c63fe23b3116cd25db0efb95c6fdb60e56f2522659a404a59576f3d9429a109cb0f90534927259289aa1c712673f36f92272d642bf8dce5699f
-DIST llvmorg-11.0.0-rc4.tar.gz 122768150 BLAKE2B e92417b6e1775a10c196534518036de6393e3cb9e0e656d4f864e7870be8fb0dad3f4cf170345e653ba60f36172df117977d5dfebe3d9ee7ec2c160d3dc9c5cd SHA512 ed2aee9f6d0bb887f27840158e9f95d94c9ad3981a0388a33fcd3e405f5072134a02999075238b6a2b8803149aa08ac790214605b186c2cc2d4827ba53c00de1
+DIST llvmorg-11.0.0.tar.gz 122743665 BLAKE2B 3f95570240789fd68ddb747df817f5c6cdc9da40911bbe9ee3531c15ada9165e5002b1c2f778cf8735858485ea05a8754e3d3a5f4b15bdd6cb33d64a14692984 SHA512 b6d38871ccce0e086e27d35e42887618d68e57d8274735c59e3eabc42dee352412489296293f8d5169fe0044936345915ee7da61ebdc64ec10f7737f6ecd90f2
DIST llvmorg-9.0.1.tar.gz 113193320 BLAKE2B b86e405f2b8e00436045fd409fe19cdde75c797b1192c62a22b5ec75e6b4dc8e874a0f33008dc31562445e4cbe53a992b6f48c684255a6a1ef261e595b8b161f SHA512 fa88beeaae94b6d0cd9b5ba38658d0ffed8004035d7d8a4f95c3d31a709b88b581ae9bd7761333c8e5375c44b8f6be01768b5a3be901163159d7e6c43b71da59
EBUILD llvm-10.0.0.ebuild 10751 BLAKE2B 338970325836138a0214d3e97e1b408b466052abe7bda4815edcb41e3b998a7b9df26bcf2caf457ee8b66d997b383a0f94a196a580671db4b5288b8522e48bb5 SHA512 c588a1cce4e950bdbd189ad0f44c1b9377adc5bdf041a1da4872cc2d629d79f73132f1776cee09d8e08cd799aa7bc0473915d3a3644606e3cc26f5329b533194
-EBUILD llvm-10.0.1.ebuild 11705 BLAKE2B d0c82c5652f611446cc36756ef005fb970b7dfda8c2e6ef6e64818564f2918340f0243cf3b82ff91d1b7f6d1dfb926f5e3f057d81f0a25ea265e1629f0cc2398 SHA512 651e7135a571e7404d8db82d36a5904b957752d164be9c24ad8847ddb3589c4ad571edb96cd56c6e38ffb9dc61601dee47a766a39b3904f67f8706ac8e0a011d
-EBUILD llvm-11.0.0.9999.ebuild 12325 BLAKE2B 41fe35b64d8f98a89f1a0ccab2861ad2d8ac4073ca944fa0f29d51246a9df5d06fd94ce2e68983e4936341c72c5d296b2af1dc8eb3414645f533afcb664653ed SHA512 d3e15dd002796b0f4b06daad6d33ed14f96b60eb45db74584c2b39878c0b064c5f185edf728d11e943b930f508f115cc3b88c05bc0da8274a42749bd8a88e528
-EBUILD llvm-11.0.0_rc3.ebuild 12325 BLAKE2B 41fe35b64d8f98a89f1a0ccab2861ad2d8ac4073ca944fa0f29d51246a9df5d06fd94ce2e68983e4936341c72c5d296b2af1dc8eb3414645f533afcb664653ed SHA512 d3e15dd002796b0f4b06daad6d33ed14f96b60eb45db74584c2b39878c0b064c5f185edf728d11e943b930f508f115cc3b88c05bc0da8274a42749bd8a88e528
-EBUILD llvm-11.0.0_rc4.ebuild 12325 BLAKE2B 41fe35b64d8f98a89f1a0ccab2861ad2d8ac4073ca944fa0f29d51246a9df5d06fd94ce2e68983e4936341c72c5d296b2af1dc8eb3414645f533afcb664653ed SHA512 d3e15dd002796b0f4b06daad6d33ed14f96b60eb45db74584c2b39878c0b064c5f185edf728d11e943b930f508f115cc3b88c05bc0da8274a42749bd8a88e528
-EBUILD llvm-12.0.0.9999.ebuild 12348 BLAKE2B 2a40e5ce5c5f930d7a50da3bae3fd3324ffdd4e9b0824e440d2f741fca13b4acb9094948961951d20a1ac14f2bbbff24fc92c693ab132eb10917d790d970b9c2 SHA512 f107d05eda19a34c4a0cf8204ce1fdba0683b9d096ed2f3ebde36c59bc666bc4e159d82782d5a12624fc193f49224cf51313312dd222a85c54977900a31f521d
+EBUILD llvm-10.0.1.ebuild 11955 BLAKE2B df1609d90f64fe1ff969af18adf18aee99ef3ddc947ee7ebc1c247e0bedc38f39cc46498841bd3fb85378329ef05f5dfa32a522c6549313d27a7f177680ad1c4 SHA512 6385e8501f927a7015298d75e472949470c58b39e35ba8cf6d264662942b714235913c49b9c37f17ce9835c220b64dbea961716bf57b62ebcc8edbb9f46f6acc
+EBUILD llvm-11.0.0.9999.ebuild 12629 BLAKE2B 2af00259c1df990169c614e689007cfea6cb877a9df06b64255c8fde48e9f750b1744918dae483730a40a0152edf99c2bbc72101a2920f19202e2d1f95fe9bc2 SHA512 5e086dda86d65e34ab9528ac2d04945a22aeb359a24c11e9b2a9d4f0862e10c879d2e1bc4e99cf3e650f1685d8c1ddf5a066fb167c880d005fc71670bb89641a
+EBUILD llvm-11.0.0.ebuild 12904 BLAKE2B f3f6bb06293efb2ab541e17d3051266a551c665f525a41d29733c8977d823dfded4e11fcac963d3302013795539f9774376c5c0f784d5e1ebbf3748cac698e8a SHA512 776abfb031174677a2a6bc36c82af074c2c38c5387af578ca6cd716f8d8a4ad8478a4ffce096dcf0ca18b30cb8231a5df2db35e7b7139efb65e06cb108b1d1fe
+EBUILD llvm-12.0.0.9999.ebuild 12718 BLAKE2B 496526527ec7cc5aea590e45a6d38800da60d446f54568a164465cc184e22e07653e745220d2271ef0d9cacdcad08404a5a5aee153086e6aa99e6022607b5087 SHA512 6091649ca4fc3864f5f3dfefc1fa5d74a539b314775d1da22c8505eafe22c40496b84919b0169de0c85e0fa2a954a98e46f09688c9d8855c3437a6ffd75e00d7
EBUILD llvm-9.0.1.ebuild 8454 BLAKE2B 33b4c7bdf4bc136d29f3f6f505799b11de31d33e393b51c9bafb121b0b8b347e86a5954ba6ba039cd6b39cb7c1a501d4747f51652351559c42ba0b84c4bae54b SHA512 f43a600265c1559e924a6f2ec97dffdacfae35df2cc3e3e874704c5ae179ba48d90fdd666411cdab500d171fa63b557538282545c7c4078867857e077c941a4c
MISC metadata.xml 2563 BLAKE2B ca85030788fb213fc891d895238fd75562cdd25cc5fe4271d709cb1c00ef56b0e8b367dc70cc18f7d185d6fbdb57333e219a984220b60141d28fb4784b2cb94a SHA512 8de68ee7f964e6eb2613bd2ff584f834e0f5a3ae8b303b5f2f10fda718a87af9b8ddfc19399950fe4eb8be515930124ced8018190af0f69da7ec5fe8180a68a2
diff --git a/sys-devel/llvm/files/11.0.0/0001-backport-D88371-guard-find_library-tensorflow_c_api.patch b/sys-devel/llvm/files/11.0.0/0001-backport-D88371-guard-find_library-tensorflow_c_api.patch
new file mode 100644
index 000000000000..73959afb2677
--- /dev/null
+++ b/sys-devel/llvm/files/11.0.0/0001-backport-D88371-guard-find_library-tensorflow_c_api.patch
@@ -0,0 +1,55 @@
+From 8dcb88f7705fb3927938dd9bd103efcabafcefb0 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Tue, 27 Oct 2020 18:20:56 -0700
+Subject: [PATCH] backport D88371, guard `find_library(tensorflow_c_api ...)`
+
+Differential Revision: https://reviews.llvm.org/D88371
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ llvm/CMakeLists.txt | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
+index 1f137f0..4112def 100644
+--- a/llvm/CMakeLists.txt
++++ b/llvm/CMakeLists.txt
+@@ -832,6 +832,11 @@ configure_file(
+ ${LLVM_INCLUDE_DIR}/llvm/Config/Targets.def
+ )
+
++# They are not referenced. See set_output_directory().
++set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
++set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
++set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
++
+ # For up-to-date instructions for installing the Tensorflow dependency, refer to
+ # the bot setup script: https://github.com/google/ml-compiler-opt/blob/master/buildbot/buildbot_init.sh
+ # In this case, the latest C API library is available for download from
+@@ -840,9 +845,9 @@ configure_file(
+ # LLVM_HAVE_TF_API, through llvm-config.h, so that a user of the LLVM library may
+ # also leverage the dependency.
+ set(TENSORFLOW_C_LIB_PATH "" CACHE PATH "Path to TensorFlow C library install")
+-find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib)
+
+-if (tensorflow_c_api)
++if (TENSORFLOW_C_LIB_PATH)
++ find_library(tensorflow_c_api tensorflow PATHS ${TENSORFLOW_C_LIB_PATH}/lib NO_DEFAULT_PATH REQUIRED)
+ set(LLVM_HAVE_TF_API "ON" CACHE BOOL "Full Tensorflow API available")
+ include_directories(${TENSORFLOW_C_LIB_PATH}/include)
+ endif()
+@@ -877,12 +882,6 @@ add_custom_target(srpm
+ COMMAND rpmbuild -bs --define '_topdir ${LLVM_SRPM_DIR}' ${LLVM_SRPM_BINARY_SPECFILE})
+ set_target_properties(srpm PROPERTIES FOLDER "Misc")
+
+-
+-# They are not referenced. See set_output_directory().
+-set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
+-set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
+-set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
+-
+ if(APPLE AND DARWIN_LTO_LIBRARY)
+ set(CMAKE_EXE_LINKER_FLAGS
+ "${CMAKE_EXE_LINKER_FLAGS} -Wl,-lto_library -Wl,${DARWIN_LTO_LIBRARY}")
+--
+2.26.2
+
diff --git a/sys-devel/llvm/llvm-10.0.1.ebuild b/sys-devel/llvm/llvm-10.0.1.ebuild
index dfd63e89cbab..d81126a219bc 100644
--- a/sys-devel/llvm/llvm-10.0.1.ebuild
+++ b/sys-devel/llvm/llvm-10.0.1.ebuild
@@ -10,6 +10,7 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=pregenerated
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
@@ -28,7 +29,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="$(ver_cut 1)"
-KEYWORDS="amd64 ~arm arm64 ~ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
+KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
@@ -58,11 +59,12 @@ BDEPEND="
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -77,10 +79,9 @@ PATCHES=(
)
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -111,7 +112,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -275,12 +276,16 @@ get_distribution_components() {
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -362,15 +367,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -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
@@ -465,6 +477,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {
diff --git a/sys-devel/llvm/llvm-11.0.0.9999.ebuild b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
index 6ee898821d6b..8e4357a1098c 100644
--- a/sys-devel/llvm/llvm-11.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0.9999.ebuild
@@ -10,6 +10,7 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=build
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
@@ -53,16 +54,18 @@ DEPEND="${RDEPEND}
gold? ( sys-libs/binutils-libs )"
BDEPEND="
dev-lang/perl
+ >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -71,10 +74,9 @@ PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -137,7 +139,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -301,12 +303,16 @@ get_distribution_components() {
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -362,6 +368,8 @@ multilib_src_configure() {
# used only for llvm-objdump tool
-DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
+ -DPython3_EXECUTABLE="${PYTHON}"
+
# disable OCaml bindings (now in dev-ml/llvm-ocaml)
-DOCAMLFIND=NO
)
@@ -388,15 +396,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -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
@@ -491,6 +506,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {
diff --git a/sys-devel/llvm/llvm-11.0.0_rc3.ebuild b/sys-devel/llvm/llvm-11.0.0.ebuild
index 6ee898821d6b..1b22698435e6 100644
--- a/sys-devel/llvm/llvm-11.0.0_rc3.ebuild
+++ b/sys-devel/llvm/llvm-11.0.0.ebuild
@@ -10,6 +10,7 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=pregenerated
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
@@ -28,7 +29,7 @@ ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="$(ver_cut 1)"
-KEYWORDS=""
+KEYWORDS="amd64 arm arm64 ppc64 x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos"
IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
@@ -53,16 +54,18 @@ DEPEND="${RDEPEND}
gold? ( sys-libs/binutils-libs )"
BDEPEND="
dev-lang/perl
+ >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -70,11 +73,16 @@ RDEPEND="${RDEPEND}
PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
+PATCHES=(
+ # backport tensorflow finding fix (avoids broken automagic dep)
+ # https://bugs.gentoo.org/748444
+ "${FILESDIR}"/11.0.0/0001-backport-D88371-guard-find_library-tensorflow_c_api.patch
+)
+
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -137,7 +145,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -301,12 +309,16 @@ get_distribution_components() {
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -362,6 +374,8 @@ multilib_src_configure() {
# used only for llvm-objdump tool
-DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
+ -DPython3_EXECUTABLE="${PYTHON}"
+
# disable OCaml bindings (now in dev-ml/llvm-ocaml)
-DOCAMLFIND=NO
)
@@ -388,15 +402,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -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
@@ -491,6 +512,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {
diff --git a/sys-devel/llvm/llvm-11.0.0_rc4.ebuild b/sys-devel/llvm/llvm-11.0.0_rc4.ebuild
deleted file mode 100644
index 6ee898821d6b..000000000000
--- a/sys-devel/llvm/llvm-11.0.0_rc4.ebuild
+++ /dev/null
@@ -1,503 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..9} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-LLVM_COMPONENTS=( llvm )
-llvm.org_set_globals
-
-# Those are in lib/Targets, without explicit CMakeLists.txt mention
-ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE )
-# Keep in sync with CMakeLists.txt
-ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
- NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
- "${ALL_LLVM_EXPERIMENTAL_TARGETS[@]}" )
-ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
-
-# Additional licenses:
-# 1. OpenBSD regex: Henry Spencer's license ('rc' in Gentoo) + BSD.
-# 2. xxhash: BSD.
-# 3. MD5 code: public-domain.
-# 4. ConvertUTF.h: TODO.
-
-LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
-SLOT="$(ver_cut 1)"
-KEYWORDS=""
-IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
- kernel_Darwin ${ALL_LLVM_TARGETS[*]}"
-REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- exegesis? ( dev-libs/libpfm:= )
- gold? (
- || (
- >=sys-devel/binutils-2.31.1-r4:*[plugins]
- <sys-devel/binutils-2.31.1-r4:*[cxx]
- )
- )
- libedit? ( dev-libs/libedit:0=[${MULTILIB_USEDEP}] )
- libffi? ( >=dev-libs/libffi-3.0.13-r1:0=[${MULTILIB_USEDEP}] )
- ncurses? ( >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}] )
- xar? ( app-arch/xar )
- xml? ( dev-libs/libxml2:2=[${MULTILIB_USEDEP}] )
- z3? ( >=sci-mathematics/z3-4.7.1:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- gold? ( sys-libs/binutils-libs )"
-BDEPEND="
- dev-lang/perl
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
- )
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
- dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
-# 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-${SLOT} )"
-
-python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
- has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-check_live_ebuild() {
- local prod_targets=(
- $(sed -n -e '/set(LLVM_ALL_TARGETS/,/)/p' CMakeLists.txt \
- | tail -n +2 | head -n -1)
- )
- local all_targets=(
- lib/Target/*/
- )
- all_targets=( "${all_targets[@]#lib/Target/}" )
- all_targets=( "${all_targets[@]%/}" )
-
- local exp_targets=() i
- for i in "${all_targets[@]}"; do
- has "${i}" "${prod_targets[@]}" || exp_targets+=( "${i}" )
- done
- # reorder
- all_targets=( "${prod_targets[@]}" "${exp_targets[@]}" )
-
- if [[ ${exp_targets[*]} != ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_EXPERIMENTAL_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_EXPERIMENTAL_TARGETS[*]}"
- eqawarn "Expected: ${exp_targets[*]}"
- eqawarn
- fi
-
- if [[ ${all_targets[*]} != ${ALL_LLVM_TARGETS[*]#llvm_targets_} ]]; then
- eqawarn "ALL_LLVM_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_TARGETS[*]#llvm_targets_}"
- eqawarn "Expected: ${all_targets[*]}"
- fi
-}
-
-check_distribution_components() {
- if [[ ${CMAKE_MAKEFILE_GENERATOR} == ninja ]]; then
- local all_targets=() my_targets=() l
- cd "${BUILD_DIR}" || die
-
- while read -r l; do
- if [[ ${l} == install-*-stripped:* ]]; then
- l=${l#install-}
- l=${l%%-stripped*}
-
- case ${l} in
- # shared libs
- LLVM|LLVMgold)
- ;;
- # TableGen lib + deps
- LLVMDemangle|LLVMSupport|LLVMTableGen)
- ;;
- # static libs
- LLVM*)
- continue
- ;;
- # meta-targets
- distribution|llvm-libraries)
- continue
- ;;
- # used only w/ USE=doc
- docs-llvm-html)
- continue
- ;;
- esac
-
- all_targets+=( "${l}" )
- fi
- done < <(ninja -t targets all)
-
- while read -r l; do
- my_targets+=( "${l}" )
- done < <(get_distribution_components $"\n")
-
- local add=() remove=()
- for l in "${all_targets[@]}"; do
- if ! has "${l}" "${my_targets[@]}"; then
- add+=( "${l}" )
- fi
- done
- for l in "${my_targets[@]}"; do
- if ! has "${l}" "${all_targets[@]}"; then
- remove+=( "${l}" )
- fi
- done
-
- if [[ ${#add[@]} -gt 0 || ${#remove[@]} -gt 0 ]]; then
- eqawarn "get_distribution_components() is outdated!"
- eqawarn " Add: ${add[*]}"
- eqawarn "Remove: ${remove[*]}"
- fi
- cd - >/dev/null || die
- fi
-}
-
-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
-
- # disable use of SDK on OSX, bug #568758
- sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die
-
- # Update config.guess to support more systems
- cp "${BROOT}/usr/share/gnuconfig/config.guess" cmake/ || die
-
- # Verify that the live ebuild is up-to-date
- check_live_ebuild
-
- llvm.org_src_prepare
-}
-
-# Is LLVM being linked against libc++?
-is_libcxx_linked() {
- local code='#include <ciso646>
-#if defined(_LIBCPP_VERSION)
- HAVE_LIBCXX
-#endif
-'
- local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1
-
- [[ ${out} == *HAVE_LIBCXX* ]]
-}
-
-get_distribution_components() {
- local sep=${1-;}
-
- local out=(
- # shared libs
- LLVM
- LTO
- Remarks
-
- # tools
- llvm-config
-
- # common stuff
- cmake-exports
- llvm-headers
-
- # libraries needed for clang-tblgen
- LLVMDemangle
- LLVMSupport
- LLVMTableGen
- )
-
- if multilib_is_native_abi; then
- out+=(
- # utilities
- llvm-tblgen
- FileCheck
- llvm-PerfectShuffle
- count
- not
- yaml-bench
-
- # tools
- bugpoint
- dsymutil
- llc
- lli
- lli-child-target
- llvm-addr2line
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-c-test
- llvm-cat
- llvm-cfi-verify
- llvm-config
- llvm-cov
- llvm-cvtres
- llvm-cxxdump
- llvm-cxxfilt
- llvm-cxxmap
- llvm-diff
- llvm-dis
- llvm-dlltool
- llvm-dwarfdump
- llvm-dwp
- llvm-elfabi
- llvm-exegesis
- llvm-extract
- llvm-gsymutil
- llvm-ifs
- llvm-install-name-tool
- llvm-jitlink
- llvm-lib
- llvm-link
- llvm-lipo
- llvm-lto
- llvm-lto2
- llvm-mc
- llvm-mca
- llvm-ml
- llvm-modextract
- llvm-mt
- llvm-nm
- llvm-objcopy
- llvm-objdump
- llvm-opt-report
- llvm-pdbutil
- llvm-profdata
- llvm-ranlib
- llvm-rc
- llvm-readelf
- llvm-readobj
- llvm-reduce
- llvm-rtdyld
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-undname
- llvm-xray
- obj2yaml
- opt
- sancov
- sanstats
- verify-uselistorder
- yaml2obj
-
- # python modules
- opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
- )
- use doc && out+=(
- docs-llvm-html
- )
-
- use gold && out+=(
- LLVMgold
- )
- fi
-
- printf "%s${sep}" "${out[@]}"
-}
-
-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=OFF
- -DLLVM_BUILD_LLVM_DYLIB=ON
- -DLLVM_LINK_LLVM_DYLIB=ON
- -DLLVM_DISTRIBUTION_COMPONENTS=$(get_distribution_components)
-
- # cheap hack: LLVM combines both anyway, and the only difference
- # is that the former list is explicitly verified at cmake time
- -DLLVM_TARGETS_TO_BUILD=""
- -DLLVM_EXPERIMENTAL_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_LIBXML2=$(usex xml)
- -DLLVM_ENABLE_ASSERTIONS=$(usex debug)
- -DLLVM_ENABLE_LIBPFM=$(usex exegesis)
- -DLLVM_ENABLE_EH=ON
- -DLLVM_ENABLE_RTTI=ON
- -DLLVM_ENABLE_Z3_SOLVER=$(usex z3)
-
- -DLLVM_HOST_TRIPLE="${CHOST}"
-
- -DFFI_INCLUDE_DIR="${ffi_cflags#-I}"
- -DFFI_LIBRARY_DIR="${ffi_ldflags#-L}"
- # used only for llvm-objdump tool
- -DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-
- # disable OCaml bindings (now in dev-ml/llvm-ocaml)
- -DOCAMLFIND=NO
- )
-
- if is_libcxx_linked; then
- # Smart hack: alter version suffix -> SOVERSION when linking
- # against libc++. This way we won't end up mixing LLVM libc++
- # libraries with libstdc++ clang, and the other way around.
- mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="libcxx"
- )
- fi
-
-# 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
-
- use test && mycmakeargs+=(
- -DLLVM_LIT_ARGS="$(get_lit_flags)"
- )
-
- if multilib_is_native_abi; then
- mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -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
-
- # workaround BMI bug in gcc-7 (fixed in 7.4)
- # https://bugs.gentoo.org/649880
- # apply only to x86, https://bugs.gentoo.org/650506
- if tc-is-gcc && [[ ${MULTILIB_ABI_FLAG} == abi_x86* ]] &&
- [[ $(gcc-major-version) -eq 7 && $(gcc-minor-version) -lt 4 ]]
- then
- local CFLAGS="${CFLAGS} -mno-bmi"
- local CXXFLAGS="${CXXFLAGS} -mno-bmi"
- fi
-
- # LLVM can have very high memory consumption while linking,
- # exhausting the limit on 32-bit linker executable
- use x86 && local -x LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
-
- # LLVM_ENABLE_ASSERTIONS=NO does not guarantee this for us, #614844
- use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
- cmake_src_configure
-
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- cmake_build distribution
-
- 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_build 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() {
- DESTDIR=${D} cmake_build install-distribution
-
- # move headers to /usr/include for wrapping
- rm -rf "${ED}"/usr/include || die
- mv "${ED}"/usr/lib/llvm/${SLOT}/include "${ED}"/usr/include || die
-
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${SLOT}/$(get_libdir)" )
-}
-
-multilib_src_install_all() {
- local revord=$(( 9999 - ${SLOT} ))
- newenvd - "60llvm-${revord}" <<-_EOF_
- 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_
-
- docompress "/usr/lib/llvm/${SLOT}/share/man"
-}
-
-pkg_postinst() {
- elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${SLOT}/share/opt-viewer"
- elog "To use these scripts, you will need Python along with the following"
- elog "packages:"
- elog " dev-python/pygments (for opt-viewer)"
- elog " dev-python/pyyaml (for all of them)"
-}
diff --git a/sys-devel/llvm/llvm-12.0.0.9999.ebuild b/sys-devel/llvm/llvm-12.0.0.9999.ebuild
index 9f6248bfa037..a1a53f9e1e26 100644
--- a/sys-devel/llvm/llvm-12.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-12.0.0.9999.ebuild
@@ -10,10 +10,11 @@ inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
DESCRIPTION="Low Level Virtual Machine"
HOMEPAGE="https://llvm.org/"
LLVM_COMPONENTS=( llvm )
+LLVM_MANPAGES=build
llvm.org_set_globals
# Those are in lib/Targets, without explicit CMakeLists.txt mention
-ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC VE )
+ALL_LLVM_EXPERIMENTAL_TARGETS=( ARC CSKY VE )
# Keep in sync with CMakeLists.txt
ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore
@@ -53,16 +54,18 @@ DEPEND="${RDEPEND}
gold? ( sys-libs/binutils-libs )"
BDEPEND="
dev-lang/perl
+ >=dev-util/cmake-3.16
sys-devel/gnuconfig
kernel_Darwin? (
<sys-libs/libcxx-$(ver_cut 1-3).9999
>=sys-devel/binutils-apple-5.1
)
- libffi? ( virtual/pkgconfig )
- $(python_gen_any_dep '
+ doc? ( $(python_gen_any_dep '
+ dev-python/recommonmark[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
- doc? ( dev-python/recommonmark[${PYTHON_USEDEP}] )
- ')"
+ ') )
+ libffi? ( virtual/pkgconfig )
+ ${PYTHON_DEPS}"
# There are no file collisions between these versions but having :0
# installed means llvm-config there will take precedence.
RDEPEND="${RDEPEND}
@@ -71,10 +74,9 @@ PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
python_check_deps() {
- if use doc; then
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" ||
- return 1
- fi
+ use doc || return 0
+
+ has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
}
@@ -137,7 +139,7 @@ check_distribution_components() {
;;
# used only w/ USE=doc
docs-llvm-html)
- continue
+ use doc || continue
;;
esac
@@ -241,6 +243,7 @@ get_distribution_components() {
llvm-ar
llvm-as
llvm-bcanalyzer
+ llvm-bitcode-strip
llvm-c-test
llvm-cat
llvm-cfi-verify
@@ -262,6 +265,7 @@ get_distribution_components() {
llvm-ifs
llvm-install-name-tool
llvm-jitlink
+ llvm-jitlink-executor
llvm-lib
llvm-libtool-darwin
llvm-link
@@ -297,17 +301,22 @@ get_distribution_components() {
opt
sancov
sanstats
+ split-file
verify-uselistorder
yaml2obj
# python modules
opt-viewer
-
- # manpages
- docs-dsymutil-man
- docs-llvm-dwarfdump-man
- docs-llvm-man
)
+
+ if llvm_are_manpages_built; then
+ out+=(
+ # manpages
+ docs-dsymutil-man
+ docs-llvm-dwarfdump-man
+ docs-llvm-man
+ )
+ fi
use doc && out+=(
docs-llvm-html
)
@@ -363,6 +372,8 @@ multilib_src_configure() {
# used only for llvm-objdump tool
-DHAVE_LIBXAR=$(multilib_native_usex xar 1 0)
+ -DPython3_EXECUTABLE="${PYTHON}"
+
# disable OCaml bindings (now in dev-ml/llvm-ocaml)
-DOCAMLFIND=NO
)
@@ -389,15 +400,22 @@ multilib_src_configure() {
)
if multilib_is_native_abi; then
+ local build_docs=OFF
+ if llvm_are_manpages_built; then
+ build_docs=ON
+ mycmakeargs+=(
+ -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
+ -DLLVM_INSTALL_SPHINX_HTML_DIR="${EPREFIX}/usr/share/doc/${PF}/html"
+ -DSPHINX_WARNINGS_AS_ERRORS=OFF
+ )
+ fi
+
mycmakeargs+=(
- -DLLVM_BUILD_DOCS=ON
+ -DLLVM_BUILD_DOCS=${build_docs}
-DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=ON
+ -DLLVM_ENABLE_SPHINX=${build_docs}
-DLLVM_ENABLE_DOXYGEN=OFF
-DLLVM_INSTALL_UTILS=ON
- -DCMAKE_INSTALL_MANDIR="${EPREFIX}/usr/lib/llvm/${SLOT}/share/man"
- -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
@@ -492,6 +510,7 @@ multilib_src_install_all() {
_EOF_
docompress "/usr/lib/llvm/${SLOT}/share/man"
+ llvm_install_manpages
}
pkg_postinst() {