summaryrefslogtreecommitdiff
path: root/sys-devel/llvm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-10-01 20:54:53 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-10-01 20:54:53 +0100
commit391b5b359a346aff490103da7dddc85047f83830 (patch)
tree29eea460a0bd7e1ff21d43b9d6df9af4d8a175e1 /sys-devel/llvm
parentc719fdcee603a5a706a45d10cb598762d56a727d (diff)
gentoo resync : 01.10.2021
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/Manifest13
-rw-r--r--sys-devel/llvm/llvm-13.0.0.ebuild (renamed from sys-devel/llvm/llvm-13.0.0_rc4.ebuild)4
-rw-r--r--sys-devel/llvm/llvm-13.0.0_rc2.ebuild511
-rw-r--r--sys-devel/llvm/llvm-13.0.0_rc3.ebuild511
4 files changed, 6 insertions, 1033 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 320e19d9135d..d982bd414600 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -1,25 +1,20 @@
DIST llvm-10.0.1-manpages.tar.bz2 180157 BLAKE2B ddf5951c8f5a2a8a80726fd713e6c818c852851a2261e904b484afdb67ac55f2ce10976ca2ca5d81fe2bf4806a72cc7b59f4068741306491a4f39065ca8fb56e SHA512 d3c2470dbd0f3143d64b380f7534ebcacdcf4bc4f140a6014283150007fe615ebd86247cf13b2432165a681614849e8eaab69a8d077f7a51e4e040e28ed33ebc
DIST llvm-11.1.0-manpages.tar.bz2 191571 BLAKE2B d6f8e1390dd3e6e8bbcd66c0079ef89f2ff3479743499c36ab32f8bc8281631a96113df9a87f6284058365950f4df3c75dacfcc11920fc5ea7ef0233ba842b77 SHA512 2543e519f51cc7ecb51a732c658ec5d35c5225e30a677f24ead75e81fb1ab793a030e79f21d0b702a2cf6ab6da1a2cba839b49a98e1b0a36384e98076ed5c4b1
DIST llvm-12.0.1-manpages.tar.bz2 191582 BLAKE2B a049cd305c257875d47e92d703c51aee8225854f999eddbd530c7a978704a981b05bc0819ba31a2f2a218d3569b078f0deb01b0eeb385966253b54a0fdc090d1 SHA512 9931a57f843709aed59193524fe980af695e4e23c8f53ec3cff308677ba4fc520ca58032b50b68440c7762305855317d9a705fe5ccbb543fb104f4deb5d10ea5
+DIST llvm-13.0.0-manpages.tar.bz2 202595 BLAKE2B 1a3a389e8c544675f7ba2692f92bb82a83beabd6c595211806ef7f473e1741ea633a773edf623011d3d011ef2ee7a1611fc9620fe921eeebe1b99c3b8b3a0652 SHA512 344139f3123169776e0fd603e605bbf537d15d80ff56ad60e66ed1639a9dec53a8ac5cd088c8e14c8b7a799b563268445562293ba1d4efeb8db438cbd9cb5fb0
DIST llvm-gentoo-patchset-10.0.1-3.tar.xz 9244 BLAKE2B f568b8eef92f048f08fb6618e7e3c69f218c73c71f85c498a341cfc06f892c15fa51011913547bb61f3f8cebb826b75276304fdcc4552b78d103b7fc6113e240 SHA512 1d90d5c990e6b7819681609a06c8b1cd5e094b9f9647ba486079abcdec375cd7c261ef1c5b41aa614decdc595bf830e1d325fb66b070cda1945bb6c7f08668b6
DIST llvm-gentoo-patchset-11.1.0-1.tar.xz 4032 BLAKE2B e69138a422e315b31a3d9c11faa4ae1ddf1bf9092cee2db0de4d2adef81fd802973488293aab48b764402b51996893b17ca03249ef4620848a576d1f6cdb9698 SHA512 e1c5504dab6c5db9fdf4addfeb12316f22d0258717ba551a9b7b3ba37919491fb6011ac5cca1e793b7509d5c1c186bc6bc4213f7d6155d190612492b216f979b
DIST llvm-gentoo-patchset-12.0.1.tar.xz 5280 BLAKE2B 963d005bc7b636570be90eb841ac5bcaeb927538cc7de27683167111a17d6496677c7517de2ecfaf14b5d8ac22bad357be490b8a2ed9aba502fd5f447ecc99e9 SHA512 fc7c38e671555751650299c3a8bee44d5c7f26e11b68d5538c507fb7fe9ff2d349bdcd43bce90a448a747f082d523b3849d6bcda5e3ae2e998edcb926d6aa249
-DIST llvm-gentoo-patchset-13.0.0-rc2.tar.xz 5556 BLAKE2B e6c7ecfe8f842edc4d4f30a20c66973519182ecb46e21fb20b6c5fcb6d54cdef830fcb120a405b77f1332e3557acbbbbfa99170b20d17f137e0a63b2d0dc1258 SHA512 ddeaf1d07f0ba893ce93e5fe1eff1c0716769a7879fc503c397f4db7becb363f94747f59b6d53c204df73a93954fb0ca5aae6ad544ce55c964c4bf441a410cd2
-DIST llvm-gentoo-patchset-13.0.0-rc3.tar.xz 5012 BLAKE2B 5399feeffe73e8fbd099c8058f1cc41e2fcb2feb446acc1394589c0397167786895d328d45ff481fb30605f215774b9e51e332124c0b071e969a2f01c5943c04 SHA512 d4fb2b08e253d9fa89070045282b4309ca9938011bf7f9b5364cc69c5030ff9353abb1624895b4bfeef2cd8e2f8c9b9f93fc8196f98dc0970457bca7787270c9
-DIST llvm-gentoo-patchset-13.0.0-rc4.tar.xz 5016 BLAKE2B 021ba4e67904e4cf4dfdf1ecfc1cd1cc860c2f43db97e04c40ca7d95567f6235a27a2a919083c58b89b269eefa2d751cb9c324bda6518c22e9fc01007936a520 SHA512 dce61179dffafc5992fb0e18314bba2d5fbf2f0470a491bc1ffc036274b65d0a1de741b23e2de32e873250c856a53707e06f8c560bd29f8a54a6ae0c74267f43
+DIST llvm-gentoo-patchset-13.0.0.tar.xz 5012 BLAKE2B 6760c78c086aaf6629143fd920b0a2c68cad9278628fbea8164dfeb59db95984a5b5d6b3505b510c697e8c95bf8d2be782c6b73c01622d52f2da9b07ecff39e0 SHA512 7764d49343b795b6bebae64f646ba27e3e6cc2a20b8a1aee645ce0d8474633c34acfbb73c08546fee415755dd4ea5a98c1d84db5e394cf5f4fc802eb61148ab6
DIST llvm-gentoo-patchset-9999-1.tar.xz 4032 BLAKE2B b9413484dafed8ae0c68c2c164b45fd07bb8d5d0898f03abe118fd2120ffcb1fb6c949de9649a97c2e8105f24b9d131a725c67c0a502ca4d4d192c1a0d65f49d SHA512 e64449eeaf756c5bd945109937b84ba4bd8a015222bd792d39cf3947871e87571a4ca57814790e51544cb05ad4c2d1f044e818e4caaac7c2e2a02cb1aa290fcc
DIST llvmorg-10.0.1.tar.gz 120880730 BLAKE2B 30f19f56c4d1f6abcda5fec76256219d1e3c8a6ff1a1f152f94bfe362c07884339fe571ff7fe903ed3b3deb150b2fa868c387887a0dea2930dc08b81db71a5b1 SHA512 48078fff9293a87f1a973f3348f79506f04c3da774295f5eb67d74dd2d1aa94f0973f8ced3f4ab9e8339902071f82c603b43d5608ad7227046c4da769c5d2151
DIST llvmorg-11.1.0.tar.gz 122776532 BLAKE2B ca842ff4afff8f44c82b5e7383962a9c45ca1c93b64fa4c6ebcd70a1d3849dbad2b8e4e24fba02d144c6266d7fab3607ebc6999b28c229cb35256cf40f26a985 SHA512 9a8ce022a935eed42fa71a224f2a207122aadcbef58ee855fdb4825f879e7d028e4dcff22c19b9d336db1c8bf63fb84372d44981acf84615f757e54306c92b81
DIST llvmorg-12.0.1.tar.gz 134259748 BLAKE2B f41de787bc73ff2edfda1b22cc8602be6f65f37dd9e4c8888533cfa8c3ccdcf4f108aaab9de23ab0ab987966eb160f2a553a0bdff99461e71ddd5bfcd086090d SHA512 6eb0dc18e2c25935fabfdfc48b0114be0939158dfdef7b85b395fe2e71042672446af0e68750aae003c9847d10d1f63316fe95d3df738d18f249174292b1b9e1
-DIST llvmorg-13.0.0-rc2.tar.gz 147267736 BLAKE2B 153bf7320f2aa911112d366ffc79f7110cb04f135c2a8b176c263f0a75eb768206d9bd462893d45504b0e58aa9e127fdcafb02300eab1666e4616aa654d457dd SHA512 a01baf3eaa02f02af42bfcf6dcf24f166351bf1c09601495617c81e41def23210573bad40a344270f40c5deb881d06863536abac2a6481930766a6a56335fb44
-DIST llvmorg-13.0.0-rc3.tar.gz 147281901 BLAKE2B 640065a2f32dc48edf084d776cb6b950fae86c2a204999e2eec67f93b57615df40adec19785099b0ef2fe11837c3304794ec3585289a5b5051a557618c63c749 SHA512 1401d5a4d6bb5c930d74b9cfbc8e792872f721aab7d7f0c819e2ba5cf47fb818d160c1f71784fba69827f3c9b7414aa91a585d2b813c1851b4799f9d62cebc46
-DIST llvmorg-13.0.0-rc4.tar.gz 147286367 BLAKE2B a43c54b8bb379b0374f99ae07066d7ba4ae2a83dfdb61390101c736f91dc44aa07a88778551aaaf903033562b2a0a863ea6b27392b700c9cddc74e2c7899cad1 SHA512 8ccaaea21ec4fe3c4b4446d3a7cae36a47ed196f407d341da45824bcefefffd3c412c0c5c27670ceaba1458bc53107273f9d3aec2de261b6b82c6d209b45b14d
+DIST llvmorg-13.0.0.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
EBUILD llvm-10.0.1.ebuild 11490 BLAKE2B 40960dd1109655157b04396283d704ea1a0af35ffd09ec9bab2718d62fde888508246ea77a473cd7512c1818b5a3a8d7b72e5786d64faf43bd42ff823b765e22 SHA512 75767e94d55ca1f9f7a769abfc0c916388e69ccd51620c8083f8bb184bf9649d2b9c75efaed46d96f8e0932cb3e6beb71d51a3b1565243218a3efd5144238296
EBUILD llvm-11.1.0.ebuild 12504 BLAKE2B 7f22ab387fab31e11d554667b1b183f5b66203f601096c130642500f877f2af473b31a0cba96da93d9c85d50e2fbafb7f46a0ff6bf2f96a0bd41266ddc04dc8f SHA512 716b8474077279b821140d2defa5f1dd5b2ab7cf09aeb27907410a184a701ecbf99f545622e68d0a81a762c3b5cbc6ff3b30415a331d38dac8fb72f37a3147bf
EBUILD llvm-12.0.1.ebuild 12620 BLAKE2B 34f9ebd56f6381d3d88a82d98abc9cbec2c8ec7a35bf2fc297f9d82afb3927d991baecc95c3d76db35d1f47d171ffd6be0b1ac953b1c6605866b94aeeae9c9d3 SHA512 fbe11d194f5c049f1bfbcfb606351282e2cf5c74a58a1980f5b9b663d3d811bc6906e084d557e4169b0c15017e9d4c0c73c842116547e60946d883b91f38aae9
EBUILD llvm-13.0.0.9999.ebuild 12097 BLAKE2B 5d514804e1296ab9f37e2da9fe2e1bb48f670f088ed9a472bb91ad42126785c444d6cd30ce172127d0146c3263e3a635570c633b06f90455bef2e3ace27f75a3 SHA512 8b9d9309a92d2b6319e467716725754810acddcc4a49daffe86177f0114687749611281a140eddc6562f06211afad852872abc7904517f816b04f54b9720ffde
-EBUILD llvm-13.0.0_rc2.ebuild 12101 BLAKE2B 3eedc6c4b114572bd5afff7e782d45b0494ea61dce46267b56defd2379d427096ffc462989bdf0486a3ea6bcfa412941083140e20c67dfcd79ab1ff9b04a8365 SHA512 e764117a06d6f5627c5873863bdec3138a3cf03f6dc528ab91b01265657104e0e4a601afacdcc5458ea688308d7f254985050a5aa48f0104f92fa8a3048ae508
-EBUILD llvm-13.0.0_rc3.ebuild 12101 BLAKE2B f7afccd0377ffa69fdfd00cfcb554b216e1b5f8a1f143409915a8fdbb7bb70b87aae5bf05860f8ea33da56cca19916ec49884597b056d8524e30a7dc54413c00 SHA512 67ee4262a435781484b716cf667700e86e9fcd505fdb7d7fca960494e2d6cc6a93e43c6f97f808c828aff417c75c5ecd2175ea824451d03e9ab3eda62854ebfd
-EBUILD llvm-13.0.0_rc4.ebuild 12100 BLAKE2B 6342babced2c7e2879fdc045e575976902970a8c5a40271a2a7c93041e0d5444c5e9faafccdab66f65b24142a525595864b597519aaacef5b2b8cab8bb37f3ec SHA512 124a9a2f996560063599bccebc84d4598940651a7068c403ca4978161e4014f552278505f16f66fc1b29503da2201d64a1bbf81c083ab6ccd345240903cd324f
+EBUILD llvm-13.0.0.ebuild 12191 BLAKE2B b6d7823e2f97b3aba292a32579017836bb04c406dda05af68d7bfc79a9a320de66b18abf91f510a6cc212cec73315c921961ee86ad6b828a5d2e6f5840cf316b SHA512 06d9ec5df9adededdad43544ec94bc30bd314936c686f55ecd396fe6fc0b0b67d4f0dd1db8f861970a7a837e4329dfd1864ceba90b376be702e18e611ef87f02
EBUILD llvm-14.0.0.9999.ebuild 12097 BLAKE2B 5d514804e1296ab9f37e2da9fe2e1bb48f670f088ed9a472bb91ad42126785c444d6cd30ce172127d0146c3263e3a635570c633b06f90455bef2e3ace27f75a3 SHA512 8b9d9309a92d2b6319e467716725754810acddcc4a49daffe86177f0114687749611281a140eddc6562f06211afad852872abc7904517f816b04f54b9720ffde
MISC metadata.xml 2564 BLAKE2B c7b78f9245daf8990548c13cb0d2c773616b6b17713794f3887028a452649bf0b9aad10d6e9366839afec9d4fbd5a3fca923435cd91a738648d1e22e2b47c89c SHA512 57a6324a8b3c0780459fd37750532d28ba8e004885c7ca4b78c91d22e97e168e479a8ebddcf32803f8825a090eac2353ffa57775b95a49c08b821ae502c86218
diff --git a/sys-devel/llvm/llvm-13.0.0_rc4.ebuild b/sys-devel/llvm/llvm-13.0.0.ebuild
index ee6e126425ca..0d80c618e3d4 100644
--- a/sys-devel/llvm/llvm-13.0.0_rc4.ebuild
+++ b/sys-devel/llvm/llvm-13.0.0.ebuild
@@ -18,7 +18,7 @@ HOMEPAGE="https://llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA BSD public-domain rc"
SLOT="$(ver_cut 1)"
-KEYWORDS=""
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
IUSE="debug doc exegesis gold libedit +libffi ncurses test xar xml z3
kernel_Darwin"
RESTRICT="!test? ( test )"
@@ -57,7 +57,7 @@ PDEPEND="sys-devel/llvm-common
gold? ( >=sys-devel/llvmgold-${SLOT} )"
LLVM_COMPONENTS=( llvm )
-LLVM_MANPAGES=build
+LLVM_MANPAGES=pregenerated
LLVM_PATCHSET=${PV/_/-}
LLVM_USE_TARGETS=provide
llvm.org_set_globals
diff --git a/sys-devel/llvm/llvm-13.0.0_rc2.ebuild b/sys-devel/llvm/llvm-13.0.0_rc2.ebuild
deleted file mode 100644
index 31f75d41c825..000000000000
--- a/sys-devel/llvm/llvm-13.0.0_rc2.ebuild
+++ /dev/null
@@ -1,511 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-
-# 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"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- exegesis? ( dev-libs/libpfm:= )
- gold? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
- 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
- >=dev-util/cmake-3.16
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
- )
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${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}
- !sys-devel/llvm:0"
-PDEPEND="sys-devel/llvm-common
- gold? ( >=sys-devel/llvmgold-${SLOT} )"
-
-LLVM_COMPONENTS=( llvm )
-LLVM_MANPAGES=build
-LLVM_PATCHSET=13.0.0-rc2
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- 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
-
- 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 [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
- eqawarn "Expected: ${prod_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)
- use doc || 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() {
- # 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-bitcode-strip
- 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-exegesis
- llvm-extract
- llvm-gsymutil
- llvm-ifs
- llvm-install-name-tool
- llvm-jitlink
- llvm-jitlink-executor
- llvm-lib
- llvm-libtool-darwin
- 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-otool
- llvm-pdbutil
- llvm-profdata
- llvm-profgen
- llvm-ranlib
- llvm-rc
- llvm-readelf
- llvm-readobj
- llvm-reduce
- llvm-rtdyld
- llvm-sim
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-tapi-diff
- llvm-undname
- llvm-windres
- llvm-xray
- obj2yaml
- opt
- sancov
- sanstats
- split-file
- verify-uselistorder
- yaml2obj
-
- # python modules
- opt-viewer
- )
-
- 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
- )
-
- 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
- -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-
- -DPython3_EXECUTABLE="${PYTHON}"
-
- # 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"
- -DLLVM_ENABLE_LIBCXX=ON
- )
- 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
- 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=${build_docs}
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=${build_docs}
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
- 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"
- llvm_install_manpages
-}
-
-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-13.0.0_rc3.ebuild b/sys-devel/llvm/llvm-13.0.0_rc3.ebuild
deleted file mode 100644
index 6eaee99b46f7..000000000000
--- a/sys-devel/llvm/llvm-13.0.0_rc3.ebuild
+++ /dev/null
@@ -1,511 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1 \
- toolchain-funcs
-
-DESCRIPTION="Low Level Virtual Machine"
-HOMEPAGE="https://llvm.org/"
-
-# 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"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- exegesis? ( dev-libs/libpfm:= )
- gold? ( >=sys-devel/binutils-2.31.1-r4:*[plugins] )
- 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
- >=dev-util/cmake-3.16
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-$(ver_cut 1-3).9999
- >=sys-devel/binutils-apple-5.1
- )
- doc? ( $(python_gen_any_dep '
- dev-python/recommonmark[${PYTHON_USEDEP}]
- dev-python/sphinx[${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}
- !sys-devel/llvm:0"
-PDEPEND="sys-devel/llvm-common
- gold? ( >=sys-devel/llvmgold-${SLOT} )"
-
-LLVM_COMPONENTS=( llvm )
-LLVM_MANPAGES=build
-LLVM_PATCHSET=13.0.0-rc3
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- 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
-
- 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 [[ ${prod_targets[*]} != ${ALL_LLVM_PRODUCTION_TARGETS[*]} ]]; then
- eqawarn "ALL_LLVM_PRODUCTION_TARGETS is outdated!"
- eqawarn " Have: ${ALL_LLVM_PRODUCTION_TARGETS[*]}"
- eqawarn "Expected: ${prod_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)
- use doc || 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() {
- # 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-bitcode-strip
- 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-exegesis
- llvm-extract
- llvm-gsymutil
- llvm-ifs
- llvm-install-name-tool
- llvm-jitlink
- llvm-jitlink-executor
- llvm-lib
- llvm-libtool-darwin
- 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-otool
- llvm-pdbutil
- llvm-profdata
- llvm-profgen
- llvm-ranlib
- llvm-rc
- llvm-readelf
- llvm-readobj
- llvm-reduce
- llvm-rtdyld
- llvm-sim
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-tapi-diff
- llvm-undname
- llvm-windres
- llvm-xray
- obj2yaml
- opt
- sancov
- sanstats
- split-file
- verify-uselistorder
- yaml2obj
-
- # python modules
- opt-viewer
- )
-
- 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
- )
-
- 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
- -DLLVM_HAVE_LIBXAR=$(multilib_native_usex xar 1 0)
-
- -DPython3_EXECUTABLE="${PYTHON}"
-
- # 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"
- -DLLVM_ENABLE_LIBCXX=ON
- )
- 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
- 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=${build_docs}
- -DLLVM_ENABLE_OCAMLDOC=OFF
- -DLLVM_ENABLE_SPHINX=${build_docs}
- -DLLVM_ENABLE_DOXYGEN=OFF
- -DLLVM_INSTALL_UTILS=ON
- )
- 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"
- llvm_install_manpages
-}
-
-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)"
-}