summaryrefslogtreecommitdiff
path: root/sys-devel/llvm
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-07-25 22:29:02 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-07-25 22:29:02 +0100
commit240b57012ace855bbfd9934b07642416ceeeb5b8 (patch)
treef73ef3c4e5df8a1c5ca8d47177cb034006e0ac09 /sys-devel/llvm
parent5c636a121a9064a4373d06b60d49a6f5d67c0e2f (diff)
gentoo auto-resync : 25:07:2023 - 22:29:01
Diffstat (limited to 'sys-devel/llvm')
-rw-r--r--sys-devel/llvm/Manifest7
-rw-r--r--sys-devel/llvm/llvm-17.0.0.9999.ebuild2
-rw-r--r--sys-devel/llvm/llvm-17.0.0_pre20230717.ebuild533
-rw-r--r--sys-devel/llvm/llvm-18.0.0.9999.ebuild (renamed from sys-devel/llvm/llvm-17.0.0_pre20230705.ebuild)2
4 files changed, 4 insertions, 540 deletions
diff --git a/sys-devel/llvm/Manifest b/sys-devel/llvm/Manifest
index 95f42fbaf0cd..1a07c23b4eb3 100644
--- a/sys-devel/llvm/Manifest
+++ b/sys-devel/llvm/Manifest
@@ -10,14 +10,11 @@ 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-3cd3f11c174baa001b337b88c7a6507eb5705cf2.tar.gz 194446197 BLAKE2B ba2ac8334f90fddfd9b8f97abd2f77bd1f1ad00c97f2b7daf6b799fe49755a9bd07e017e93cc634163ad7499e70d886556715e26e9d7ed9017018861c3522735 SHA512 b12d02a7b4df08e8decf99ac86875bef72ff2fa546699e7a94bfd2b2ad1e1256aec66185f9e2f7c2f5d06b1eeb3faae44a2c457b33e5c7416d3bd9921759b39d
-DIST llvm-project-5ae7fde004cbc640c2f60207791ac36574e5f5c6.tar.gz 193410766 BLAKE2B 50287f1ad41a895040934f8f19fd8aa2e91065b930ab14125dbbc3977273655d11482b6229577c11a8ad2bdd854ca109449b603bbc2e30cee20e95e4fe11e8b7 SHA512 f24f7a3b0661d2d4533b24c295c114817aff22c8f1d473ffa639cee547d31502719f8e1be4f25b970d450ecb9dcaa809c0e12b1bb380774f52cda82a4769d7bc
DIST llvm-project-5f1a388a11ae67c2e5d7a4d1fe45e369a393c572.tar.gz 194911977 BLAKE2B d7277591ddca0046dcc244f591732440a6c63c06557d96d18792c2544797a3bcea4af241ad1e9c0106a9751f52bfbcec0544020cc20874e8c64a31a8055d07d0 SHA512 b38aed6a21a3dd4325faf45475b843dcebab89d8ad9683e0f7699701f9645fa9467e032b822473c53a3242930d681caba9dd9530560636cf093108640470bbbe
EBUILD llvm-14.0.6-r4.ebuild 12313 BLAKE2B 2369fc43e915e41fbb62495870e8cbd2d9edd94867eee5d121dd5b9b20fca6a2f5a1b2b0372042a9244be1127ae3ac53ef03f1a8298621d30746e1f932d7045c SHA512 57d12cd942e26e45b70f85e94a912d39759aa65a5232ca17db30e2316e47e2f5d9cfccd37a8e095497b76b815e4899f76778537a3c1586a2d459a36019765906
EBUILD llvm-15.0.7-r3.ebuild 12486 BLAKE2B 1c62b4a9f7493b3cf9bd2ca388d9c09da2077a5be4b19dba2628352e0524e37df1e3481cc3e0658d3ce8eeb81fe7b4e379be7d5ba9e20a60376616e5a38f6264 SHA512 d6eea0d3330e29a4a27bb758cb5abec08b35f5b0d6a9bacfeddcaf031b0c125ba9454d4eb77a65fe6dd5b379654dd895d603e0a01008b57476502be82ffb392c
EBUILD llvm-16.0.6.ebuild 12513 BLAKE2B add533d36769efc9f8247c072f8f63e1964b77b5f9531c620dbabc19f4e99e241c5747553cb2de6f7b28b5242a8f97223d900ab8b505e8e55513d28113bd13e1 SHA512 c25f62f48cba000bce2ccd6772bcb58d99345a879460ba48b906fe69c79b001127e9cf24e49a9ce7fc1f41d81dac6e3e3d4f246bf779d6ecf78955ba4effa150
-EBUILD llvm-17.0.0.9999.ebuild 12690 BLAKE2B d893c2d895dce9ceccb53a848ad3c242febebef21a3d261c36b18664876453470c4cae04ac4707777178f06799fcd6b0645e688ff385ec92382c5008a7328f8d SHA512 3f0de58fd4d9af36675189a26d3f56c85f062f03c65a5f0ae24ffb1942458fd4d4c89cb28e033e0aa229a8affa65e7d8b7326dc6ddb64cbba49e775495c6fa29
-EBUILD llvm-17.0.0_pre20230705.ebuild 12690 BLAKE2B d893c2d895dce9ceccb53a848ad3c242febebef21a3d261c36b18664876453470c4cae04ac4707777178f06799fcd6b0645e688ff385ec92382c5008a7328f8d SHA512 3f0de58fd4d9af36675189a26d3f56c85f062f03c65a5f0ae24ffb1942458fd4d4c89cb28e033e0aa229a8affa65e7d8b7326dc6ddb64cbba49e775495c6fa29
-EBUILD llvm-17.0.0_pre20230717.ebuild 12690 BLAKE2B d893c2d895dce9ceccb53a848ad3c242febebef21a3d261c36b18664876453470c4cae04ac4707777178f06799fcd6b0645e688ff385ec92382c5008a7328f8d SHA512 3f0de58fd4d9af36675189a26d3f56c85f062f03c65a5f0ae24ffb1942458fd4d4c89cb28e033e0aa229a8affa65e7d8b7326dc6ddb64cbba49e775495c6fa29
+EBUILD llvm-17.0.0.9999.ebuild 12688 BLAKE2B f0bd9fbe40fd4a4f4f4195b8466cf7a140033038b0777ac0bf296d80d0f3199b0aa82eba7f1807bc9a9bc16480751fbc801445afb4968043a3681e3bf6420ea9 SHA512 baa56c55ac24f1d9cfc62c9fa93878b9c24b9877f4958178c548187f21496221a8193d61e079ccc04b16abb82030f7ffdca27a7d567f02e72286ccec208b8010
EBUILD llvm-17.0.0_pre20230722.ebuild 12690 BLAKE2B d893c2d895dce9ceccb53a848ad3c242febebef21a3d261c36b18664876453470c4cae04ac4707777178f06799fcd6b0645e688ff385ec92382c5008a7328f8d SHA512 3f0de58fd4d9af36675189a26d3f56c85f062f03c65a5f0ae24ffb1942458fd4d4c89cb28e033e0aa229a8affa65e7d8b7326dc6ddb64cbba49e775495c6fa29
+EBUILD llvm-18.0.0.9999.ebuild 12688 BLAKE2B f0bd9fbe40fd4a4f4f4195b8466cf7a140033038b0777ac0bf296d80d0f3199b0aa82eba7f1807bc9a9bc16480751fbc801445afb4968043a3681e3bf6420ea9 SHA512 baa56c55ac24f1d9cfc62c9fa93878b9c24b9877f4958178c548187f21496221a8193d61e079ccc04b16abb82030f7ffdca27a7d567f02e72286ccec208b8010
MISC metadata.xml 2782 BLAKE2B 4bd546287f630462c3f5d98cbd15a59a4cdef4023f86a5f4fe64fc5f10256cae7014d18823bd0909f4af4e42f299b6e7983c9c3c569cfab1ad38b0160f1eae40 SHA512 6bf1dc4f71f50e1eecc55cbb8366d8ed82a3dd328871acf1d808fc5e3ee4d203d623f81d9968bda45a87c72a2f20ed69b735b0a289b0052b048175cf6502e124
diff --git a/sys-devel/llvm/llvm-17.0.0.9999.ebuild b/sys-devel/llvm/llvm-17.0.0.9999.ebuild
index dd7be5a60d95..3b29671ea107 100644
--- a/sys-devel/llvm/llvm-17.0.0.9999.ebuild
+++ b/sys-devel/llvm/llvm-17.0.0.9999.ebuild
@@ -459,7 +459,7 @@ multilib_src_configure() {
grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
multilib_is_native_abi && check_distribution_components
}
diff --git a/sys-devel/llvm/llvm-17.0.0_pre20230717.ebuild b/sys-devel/llvm/llvm-17.0.0_pre20230717.ebuild
deleted file mode 100644
index dd7be5a60d95..000000000000
--- a/sys-devel/llvm/llvm-17.0.0_pre20230717.ebuild
+++ /dev/null
@@ -1,533 +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=""
-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_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
-
- # 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_MASTER_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)"
-}
diff --git a/sys-devel/llvm/llvm-17.0.0_pre20230705.ebuild b/sys-devel/llvm/llvm-18.0.0.9999.ebuild
index dd7be5a60d95..3b29671ea107 100644
--- a/sys-devel/llvm/llvm-17.0.0_pre20230705.ebuild
+++ b/sys-devel/llvm/llvm-18.0.0.9999.ebuild
@@ -459,7 +459,7 @@ multilib_src_configure() {
grep -q -E "^CMAKE_PROJECT_VERSION_MAJOR(:.*)?=${LLVM_MAJOR}$" \
CMakeCache.txt ||
- die "Incorrect version, did you update _LLVM_MASTER_MAJOR?"
+ die "Incorrect version, did you update _LLVM_MAIN_MAJOR?"
multilib_is_native_abi && check_distribution_components
}