summaryrefslogtreecommitdiff
path: root/sys-devel/llvm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-09 23:17:55 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-09 23:17:55 +0000
commit8fc08491f26431ec46b36d6ebef9551f3773b96f (patch)
treed1b5bd96d856b4ddb71d02628504d39fae5c168e /sys-devel/llvm
parentfd1ea0a53f74daa4fd860ac35a20ba1817fd20fa (diff)
gentoo auto-resync : 09:12:2023 - 23:17:54
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/Manifest4
-rw-r--r--sys-devel/llvm/llvm-17.0.5.ebuild541
2 files changed, 0 insertions, 545 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 9a9dc0606bff..6727396ace7a 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -5,7 +5,6 @@ DIST llvm-17.0.1-manpages.tar.bz2 263148 BLAKE2B 6485a261e356eacc4a274f9b8d329b5
DIST llvm-gentoo-patchset-14.0.6-r4.tar.xz 19360 BLAKE2B 814dd617d237b0bd9c80bdd9d921196b8f93248b731083e79455d4609a05dd15b6847fc227359624abce683ecdaadaefea71dc9b65b7edd1fc3912123fa55054 SHA512 9ac57abc87a63cf31ecd021e6dd44f5f11cd6136fa3b92e89c52a6d13e0ed471f88e6e96160baeac4615eedff7943048a35a98c8d37387894c9c2d1f5df277ce
DIST llvm-gentoo-patchset-15.0.7-r3.tar.xz 24268 BLAKE2B 6531ae385ecea87bc26dba8ce19b4cde8ff224c80fd81f04c6ded131e305ecfdeb8d29ebd3b68a641d240805dc83eb0ebc7cc85124f02ad0ee66e0f201b91d7e SHA512 66cb33f8b423736b990fb75d4f2d1e5f14c0b03308f403297204dd1a352d72f85f34220fd66d3de5d6df328cdf2ffce03c2a111cb0bb57791cf68a88069ac7df
DIST llvm-gentoo-patchset-16.0.6.tar.xz 17340 BLAKE2B 37cdf4b38367b4256d4f7a25d1b4f41758e5f81be8e20a1c94a10d6c5e36642e9672121b455e73a0bac2eb40467ef2db4b43789b2912a6790593d97b8b5c27e3 SHA512 2c02b9d8a4c5af9fddcd26c95dc66fffae32cb5b7f85c65a1aa4ed00dd8cd5b01cc1975a711aee63c0b8b11e9dc20f2bc05ea753904eb516892b820f02aff825
-DIST llvm-gentoo-patchset-17.0.5.tar.xz 1236 BLAKE2B 1cd550371f15156160740074115dd0d4b9f9d65ca41544f963f7eb98adce8767e50807192bf94fa7a4209dbcdfae15fd0b7a865b88216ac6112dfba474891808 SHA512 8e5cb8f0b688b44b94547ecc8d35e367c2c9f1f1562bf6bdae873dc3c593582d73c2a6dc5fbd457226f9ee450bb024a43adc696934db8333017bad9fa82a23cf
DIST llvm-gentoo-patchset-17.0.6.tar.xz 1792 BLAKE2B 21b34b436333c0b37522d4340cccc84a572701f6e267cf7c6adfa9be419913f5a6c9ee40a6be5c62d12fbd868912801d30381573c4459c05676e05785cccaefe SHA512 2d90b5e7fcbb950249ef7133fac1ed3dcb758a4d92732119049526cea0b291bd4e9738c4c0d806d70e7d769e1906f8ef3930066c206c00b6ec7d3509ed0fed19
DIST llvm-project-14.0.6.src.tar.xz 105618228 BLAKE2B ee67c5407df8cef493b9c0004f15e428f22a536a17e5f4e3eb29a003b8a8ec0abe0fa3e072591161d5f30ef7d8867c1ce34d1b341ad858e93c00263499941a99 SHA512 6fc6eeb60fac698702d1aac495fc0161eb7216a1f8db2020af8fccec5837831f7cc20dc2a169bf4f0b5f520748280b4a86621f3697d622aa58faaa45dbfaad13
DIST llvm-project-14.0.6.src.tar.xz.sig 566 BLAKE2B cb658ad43d8ab6c43a5773aedadf0569c97b5ee4b1bd58eceb10e1879a30880c741c3d66bedd462c892309b688fb7b2673115a62d1f74d71ee375a578de9547f SHA512 b4a7b368532a7a4a24376cfa7db8f6d3478f6d4446474342fc00b474ecf466330cd0f16783209263c4c72d5fc7ddedfb11b95578842e700cfb7ee0bb34cc95d6
@@ -13,8 +12,6 @@ DIST llvm-project-15.0.7.src.tar.xz 110936452 BLAKE2B f3d277e2029157329e5be78b78
DIST llvm-project-15.0.7.src.tar.xz.sig 566 BLAKE2B 47dc8c82d86237b80c6d85f83a6c9a6e9e174cf8e7f367b071e0cd9481d7cd408e991337c5624e07f3f370f26387c814f212808575ed1c1b58404d3e3836b7df SHA512 fc6891b440dd1175eb8df3790590af8d36bc92301660f84744ae15123475aeb900a151e6a8e7998ded27ec4d86871903ad0b89cd61164943054c2e3bc8d8beb2
DIST llvm-project-16.0.6.src.tar.xz 118013488 BLAKE2B 95192d39cbd2914e5609db365965f1c00bfea6c2d653b3996bd2acef8a2b37e37f6fc8a9d2b65711ad72657e0ef52c42f733053cf65051e7822f27396c30406d SHA512 89a67ebfbbc764cc456e8825ecfa90707741f8835b1b2adffae0b227ab1fe5ca9cce75b0efaffc9ca8431cae528dc54fd838867a56a2b645344d9e82d19ab1b7
DIST llvm-project-16.0.6.src.tar.xz.sig 566 BLAKE2B 2060cebd5ed57cb8a86a44238c43dfd4b921649298b10c3d19da308374c1e49869174294e29943c2af459fe06428264e26881d6c1288ebbc48686cc2cf467c7a SHA512 ca249262c7102e0889ec1bdc6f71a3a6f0e7e5d5fbab8abcd6fccd2871e7955eff7af5b055a76006097baf0dfaf2f5069eff3035b3107fc552abdb2481b21447
-DIST llvm-project-17.0.5.src.tar.xz 127842560 BLAKE2B 2d657ff14ad2dc932a5cdc6605ad30cba8e22ed8f4adb5ed53bfd9b5b654496023df9eb895f9691e98bba6b6a341b81d8a17361daf81ce4c3cd6a2b3602cd90e SHA512 793b63aa875b6d02e3a2803815cc9361b76c9ab1506967e18630fc3d6811bf51c73f53c51d148a5fc72e87e35dc2b88cb18b48419939c436451fe65c5a326022
-DIST llvm-project-17.0.5.src.tar.xz.sig 438 BLAKE2B d65bfe2816c49a4b3dda2c70fe5ca6a6b7e922338219e7a62b2f33082d88b700781e184f2b3b0758c1d46825cf369ddd6f8824f3be8d8f3a70a88cfbc06bba45 SHA512 509a61434471463459d3ec837e3f3cce662650d4e72ffc7d28fbeb0d5cfe92d5b1dc4fa568e40f48757b1e708de793bc157de7225ac15a00221191e6c1e660d9
DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e0654111941649e15794179641806f18919f1dc68c41ca0cabd5693b5096d05dccc3a391cd20d34af1137bf8af92ed3117a1ce84d1b2 SHA512 6d85bf749e0d77553cc215cbfa61cec4ac4f4f652847f56f946b6a892a99a5ea40b6ab8b39a9708a035001f007986941ccf17e4635260a8b0c1fa59e78d41e30
DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340
DIST llvm-project-5237193b87721134541f228e28edfd544a9c8ac8.tar.gz 201404340 BLAKE2B f028b8b100721202007e3106d8ee91bcf2ac90588f9268ec835dc4ea3941363d4b796338146c65d1a9e88957d18738030f713b3fed770616c79cb40043e706db SHA512 40a4d4f99f1a690a0f8737261aeeaa61af6124eeadcb6bab5c3828e88b36b8cce42a8caee6d3f01e675047c59b62210de017d207e341f680eff97758f798ad45
@@ -22,7 +19,6 @@ DIST llvm-project-6a4489a73337907d52e7eaf3716f3de9008e6e53.tar.gz 201703120 BLAK
EBUILD llvm-14.0.6-r4.ebuild 12313 BLAKE2B fc192cd5a0ce4392b3aae13e068522dcac0925cd67afae7c230b150e8ddab3a302dd3dbf5b9eb9ea0092ca8d5464e43f4a37d6e615998fc8259a2fbd669deb44 SHA512 839388316772e70d13ac1b6f72d93171dc698659a79766057a7dc16b191f5f417c919398c9ff09430fb128654452a01fa1dcfce27c60ac29aa11edb5eed3be0b
EBUILD llvm-15.0.7-r3.ebuild 12486 BLAKE2B 1c62b4a9f7493b3cf9bd2ca388d9c09da2077a5be4b19dba2628352e0524e37df1e3481cc3e0658d3ce8eeb81fe7b4e379be7d5ba9e20a60376616e5a38f6264 SHA512 d6eea0d3330e29a4a27bb758cb5abec08b35f5b0d6a9bacfeddcaf031b0c125ba9454d4eb77a65fe6dd5b379654dd895d603e0a01008b57476502be82ffb392c
EBUILD llvm-16.0.6.ebuild 12812 BLAKE2B 1063af92819795e6867db4ef9c7f31826df93560b99a56fdc33f315319cc916dde824f2282c74b54430da11a5a9e5428de6552ee57ef0f4bdd4b3c69d3ee230f SHA512 d23327496b4a9d58aa8bae415d85fda284bfc499c3552a272b160bb6f6f85d1300f0e5d536d24c97e58def556e1743ebeae9dc7d718bf6a0a994a63e07054969
-EBUILD llvm-17.0.5.ebuild 13100 BLAKE2B 054b13ea90105c70a9b40cef1cdee3157515bca2350b5fcf69ea8d81a45fb259c523f70e2306f101b6078e367143c1798acc3d7c5e5391a9c6e15c5053f11768 SHA512 6a1973ec5a0045c65e45e53c8f18230098831c5ba4893c908cdf22f4747f03702e19627cabe1d1c7407ab988d52c74ee83a287f96dccaf1e6af8caaa45585d68
EBUILD llvm-17.0.6.ebuild 13100 BLAKE2B 054b13ea90105c70a9b40cef1cdee3157515bca2350b5fcf69ea8d81a45fb259c523f70e2306f101b6078e367143c1798acc3d7c5e5391a9c6e15c5053f11768 SHA512 6a1973ec5a0045c65e45e53c8f18230098831c5ba4893c908cdf22f4747f03702e19627cabe1d1c7407ab988d52c74ee83a287f96dccaf1e6af8caaa45585d68
EBUILD llvm-18.0.0.9999.ebuild 12834 BLAKE2B ac3482d8d907e8416d87ece1c2e34dac0427daab18dcfc5b475fb3ec59713d725495740e3a0bfd9c37cef006993d4add504c29ee0118879c30cb9a0479cbcfa5 SHA512 eac78f66e7b2781c7b15817186e6ac7b2cee696974e7a4946260cb14281f2655cf119f73f3ab30e77e2a324ddc0dae50d028d14311cb02f2dc4fd39b28a4f91f
EBUILD llvm-18.0.0_pre20231119.ebuild 12834 BLAKE2B ac3482d8d907e8416d87ece1c2e34dac0427daab18dcfc5b475fb3ec59713d725495740e3a0bfd9c37cef006993d4add504c29ee0118879c30cb9a0479cbcfa5 SHA512 eac78f66e7b2781c7b15817186e6ac7b2cee696974e7a4946260cb14281f2655cf119f73f3ab30e77e2a324ddc0dae50d028d14311cb02f2dc4fd39b28a4f91f
diff --git a/sys-devel/llvm/llvm-17.0.5.ebuild b/sys-devel/llvm/llvm-17.0.5.ebuild
deleted file mode 100644
index 8c476ecc2bc9..000000000000
--- a/sys-devel/llvm/llvm-17.0.5.ebuild
+++ /dev/null
@@ -1,541 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit cmake llvm.org multilib-minimal pax-utils python-any-r1
-inherit 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="${LLVM_MAJOR}/${LLVM_SOABI}"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~ppc-macos ~x64-macos"
-IUSE="
- +binutils-plugin debug debuginfod doc exegesis libedit +libffi
- ncurses test xar xml z3 zstd
-"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- debuginfod? (
- net-misc/curl:=
- dev-cpp/cpp-httplib:=
- )
- exegesis? ( dev-libs/libpfm:= )
- 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}] )
- zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-DEPEND="
- ${RDEPEND}
- binutils-plugin? ( sys-libs/binutils-libs )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- dev-lang/perl
- >=dev-util/cmake-3.16
- sys-devel/gnuconfig
- kernel_Darwin? (
- <sys-libs/libcxx-${LLVM_VERSION}.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 )
-"
-# 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
- sys-devel/llvm-toolchain-symlinks:${LLVM_MAJOR}
- binutils-plugin? ( >=sys-devel/llvmgold-${LLVM_MAJOR} )
-"
-
-LLVM_COMPONENTS=( llvm cmake third-party )
-LLVM_MANPAGES=1
-LLVM_PATCHSET=${PV}
-LLVM_USE_TARGETS=provide
-llvm.org_set_globals
-
-python_check_deps() {
- use doc || return 0
-
- python_has_version -b "dev-python/recommonmark[${PYTHON_USEDEP}]" &&
- python_has_version -b "dev-python/sphinx[${PYTHON_USEDEP}]"
-}
-
-check_uptodate() {
- 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)
- ;;
- # testing libraries
- LLVMTestingAnnotations|LLVMTestingSupport)
- ;;
- # 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 ebuild is up-to-date
- check_uptodate
-
- llvm.org_src_prepare
-}
-
-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
-
- # testing libraries
- llvm_gtest
- llvm_gtest_main
- LLVMTestingAnnotations
- LLVMTestingSupport
- )
-
- if multilib_is_native_abi; then
- out+=(
- # utilities
- llvm-tblgen
- FileCheck
- llvm-PerfectShuffle
- count
- not
- yaml-bench
- UnicodeNameMappingGenerator
-
- # 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-debuginfo-analyzer
- llvm-debuginfod-find
- llvm-diff
- llvm-dis
- llvm-dlltool
- llvm-dwarfdump
- llvm-dwarfutil
- 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-remark-size-diff
- llvm-remarkutil
- llvm-rtdyld
- llvm-sim
- llvm-size
- llvm-split
- llvm-stress
- llvm-strings
- llvm-strip
- llvm-symbolizer
- llvm-tapi-diff
- llvm-tli-checker
- 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 binutils-plugin && out+=(
- LLVMgold
- )
- use debuginfod && out+=(
- llvm-debuginfod
- )
- 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/${LLVM_MAJOR}"
- -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_INCLUDE_BENCHMARKS=OFF
- -DLLVM_INCLUDE_TESTS=ON
- -DLLVM_BUILD_TESTS=$(usex test)
- -DLLVM_INSTALL_GTEST=ON
-
- -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_ENABLE_ZSTD=$(usex zstd)
- -DLLVM_ENABLE_CURL=$(usex debuginfod)
- -DLLVM_ENABLE_HTTPLIB=$(usex debuginfod)
-
- -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
- )
-
- local suffix=
- if [[ -n ${EGIT_VERSION} && ${EGIT_BRANCH} != release/* ]]; then
- # the ABI of the main branch is not stable, so let's include
- # the commit id in the SOVERSION to contain the breakage
- suffix+="git${EGIT_VERSION::8}"
- fi
- if [[ $(tc-get-cxx-stdlib) == libc++ ]]; 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.
- suffix+="+libcxx"
- mycmakeargs+=(
- -DLLVM_ENABLE_LIBCXX=ON
- )
- fi
- mycmakeargs+=(
- -DLLVM_VERSION_SUFFIX="${suffix}"
- )
-
- 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/${LLVM_MAJOR}/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 binutils-plugin && mycmakeargs+=(
- -DLLVM_BINUTILS_INCDIR="${EPREFIX}"/usr/include
- )
- fi
-
- # On Macos prefix, Gentoo doesn't split sys-libs/ncurses to libtinfo and
- # libncurses, but llvm tries to use libtinfo before libncurses, and ends up
- # using libtinfo (actually, libncurses.dylib) from system instead of prefix
- use kernel_Darwin && mycmakeargs+=(
- -DTerminfo_LIBRARIES=-lncurses
- )
-
- # 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
-
- grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
- CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
- multilib_is_native_abi && check_distribution_components
-}
-
-multilib_src_compile() {
- tc-env_build 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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/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/${LLVM_MAJOR}/include "${ED}"/usr/include || die
-
- LLVM_LDPATHS+=( "${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir)" )
-}
-
-multilib_src_install_all() {
- local revord=$(( 9999 - ${LLVM_MAJOR} ))
- newenvd - "60llvm-${revord}" <<-_EOF_
- PATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
- # we need to duplicate it in ROOTPATH for Portage to respect...
- ROOTPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/bin"
- MANPATH="${EPREFIX}/usr/lib/llvm/${LLVM_MAJOR}/share/man"
- LDPATH="$( IFS=:; echo "${LLVM_LDPATHS[*]}" )"
- _EOF_
-
- docompress "/usr/lib/llvm/${LLVM_MAJOR}/share/man"
- llvm_install_manpages
-}
-
-pkg_postinst() {
- elog "You can find additional opt-viewer utility scripts in:"
- elog " ${EROOT}/usr/lib/llvm/${LLVM_MAJOR}/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)"
-}