summaryrefslogtreecommitdiff
path: root/sys-libs/libcxxabi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
committerV3n3RiX <venerix@koprulu.sector>2022-03-20 00:40:44 +0000
commit4cbcc855382a06088e2f016f62cafdbcb7e40665 (patch)
tree356496503d52354aa6d9f2d36126302fed5f3a73 /sys-libs/libcxxabi
parentfcc5224904648a8e6eb528d7603154160a20022f (diff)
gentoo resync : 20.03.2022
Diffstat (limited to 'sys-libs/libcxxabi')
-rw-r--r--sys-libs/libcxxabi/Manifest10
-rw-r--r--sys-libs/libcxxabi/libcxxabi-13.0.1.ebuild (renamed from sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild)2
-rw-r--r--sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild64
-rw-r--r--sys-libs/libcxxabi/libcxxabi-14.0.0_rc4.ebuild (renamed from sys-libs/libcxxabi/libcxxabi-13.0.1_rc3.ebuild)65
-rw-r--r--sys-libs/libcxxabi/libcxxabi-15.0.0.9999.ebuild124
5 files changed, 195 insertions, 70 deletions
diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest
index 8610536eceb6..4a5aa49aa6c2 100644
--- a/sys-libs/libcxxabi/Manifest
+++ b/sys-libs/libcxxabi/Manifest
@@ -1,11 +1,13 @@
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.tar.gz 147270176 BLAKE2B 628f316b580e1edf3a58d4825b724df759e6ed2a4116802470c04562caefc392fa325c91f388036365a2e45a9595cca6d3557fab12984fc8bcfef29c9116d822 SHA512 8004c05d32b9720fb3391783621690c1df9bd1e97e72cbff9192ed88a84b0acd303b61432145fa917b5b5e548c8cee29b24ef8547dcc8677adf4816e7a8a0eb2
-DIST llvmorg-13.0.1-rc3.tar.gz 147302323 BLAKE2B 9ac2f97568062d7dd618295a68d6e14898fcd69e2bb66290b999ceb8c12132371f4e9b59d8ba2b252e5e5cb249045676b24fc50c117b2afae20abab98f426582 SHA512 88a04ad02af2d41ec21c7a62bad21ee0e627b7276a16795875afd062ed29ac7fb4aadec5b5e48785a6502c9fd797a4b67d648a21f193c9f7602112870b10a3d1
+DIST llvmorg-13.0.1.tar.gz 147290251 BLAKE2B 2a44b012a672501761d0c27c6b3a315b69bfef0cd13b078a7e7d2fccc4a9c8c0f2bee0f164c4271c9106b0a99cb06e8b64986f66253b613336719fb86b82541b SHA512 9a8cb5d11964ba88b7624f19ec861fb28701f23956ea3c92f6ac644332d5f41fde97bd8933dd3ee70ed378058c252fa3a3887c8d1af90d219970c2b27691166f
+DIST llvmorg-14.0.0-rc4.tar.gz 158082013 BLAKE2B 0e717898d8f1ed160e525a68aba56a84b7d31856ea72fdb8fa02e863c5a2074245a38d4a4aa7d178beab1ea64aa92d0ba9dcad4373ebb03868070bf718112107 SHA512 a942848aa5042b97bab6d0d5bcee11ea2f85f1244d7eaadb8f7000bf104b2160e6034c04e3755501dd178bc99c26669cf4aca40edb4bba598fdde6bcf3f40ddc
EBUILD libcxxabi-11.1.0.ebuild 3548 BLAKE2B 322a3306a33c720fd242b6dc69c233562f24c373c76b13d7a41332b26e668b7742c33550fd41fd3f2f0965390ed0cc3185b05d36908e434067f94f353b27e2e3 SHA512 40b2755e57c13a6473a53da14c257d73a4e9d13ea4ed08d23957d15892d3a702f705d294059f0dc13320930214da7793037cd94715f64ebfebbfc2da8f23321a
EBUILD libcxxabi-12.0.1.ebuild 3532 BLAKE2B 87f97e6d1d5c222b1a421bc7ee0fb1e9f0156c5f34888456dc265356fd2ae5e1b22343cd8970acf2820852f9be12d48006dee1d9493972b5761781156393735d SHA512 6369fbc69360eb0bb25e49d4fc554b897a86c7ac081c99cdc97bf61ddfa6cfe75c297afb91fa3c8fb6f24db67cc326a5ee3de74e10fdab1702d1894b3a5ba8a3
EBUILD libcxxabi-13.0.0.ebuild 3605 BLAKE2B 7bdc8ecd9c35cdc247f08f9d5687d7362013be7c9c5afe006817cb5a384d4dd272bc686c6fe2ddf2a9bde5be8d1fa185ae60da940fded833a356f76e6105feb8 SHA512 69c4564fc68e3037620de0ce0cda29093bff9eb919f48f4760558edd1031c0d198991e6346774244701679aa0619d6afd814ec80d0d66265418408416621d9d0
-EBUILD libcxxabi-13.0.1.9999.ebuild 3568 BLAKE2B 530c789f770a424bd9a23ef8a7e2f2b075e882a03610e9dcb5167b6750f3efcc4f03f99932f9f79fb1347239610696fd4803b1cb1f48ba9c1efc3023d70e6be2 SHA512 d352e9fa5c6a1806f99c6cc74e92c225dd69132bdc7cf0e895b14d0998ada7b329d782e75df6f52b7209f7fd7618c11643353942e11732f4ed7ac615ed37fe72
-EBUILD libcxxabi-13.0.1_rc3.ebuild 3568 BLAKE2B 530c789f770a424bd9a23ef8a7e2f2b075e882a03610e9dcb5167b6750f3efcc4f03f99932f9f79fb1347239610696fd4803b1cb1f48ba9c1efc3023d70e6be2 SHA512 d352e9fa5c6a1806f99c6cc74e92c225dd69132bdc7cf0e895b14d0998ada7b329d782e75df6f52b7209f7fd7618c11643353942e11732f4ed7ac615ed37fe72
-EBUILD libcxxabi-14.0.0.9999.ebuild 3504 BLAKE2B 8d9e63ac6e0b6f77af5c25095ed8f95c49130c403da0d313bad1f84f4d56818bc5b3d38e02d2ee44014761407a7767d0a0ec4ca224ac115ef601450b50b76272 SHA512 5f3982f79607b0d40b53e0d4611e709cc8d03d0e245a368aaeb1e42aa2c719f4cd9f00cf17fb30ff41c6430b655c2d7ca88b208731ba7487206e8a70805d0c89
+EBUILD libcxxabi-13.0.1.ebuild 3606 BLAKE2B e81a4b8b3f179d70f5e54b311c6298c427505945ba53ae7f9e42c0113e7dbd3e5178ff1e9f0bd2ba27e491ca252efdcc337e572cc722d27912231ca3eee45687 SHA512 36cca18b3f083205d486fe07d78ce8d0cc79b1af59f8289731d5615591fe98d67ae3f48012d8a19c2e87a3a38c7118feaed44a60d132323b90e376c76d0a14f2
+EBUILD libcxxabi-14.0.0.9999.ebuild 3459 BLAKE2B e154cf8ad9a7055fb941d4b2cdc78ce87286f3ae648f37170606775c791ff2b69b5b421a9cc716fa12aa86ec9b0a48643e78aab0a7b372d4f79cf362bc4b9a8b SHA512 79b43fd3cecec2393431df7d9a6720a4cff5ef24977b579dc815120262ba2a860df06ceb7e93f9c8df578fd5737a02abad4c737774cc7b9d4983567aa9ef6b3e
+EBUILD libcxxabi-14.0.0_rc4.ebuild 3459 BLAKE2B e154cf8ad9a7055fb941d4b2cdc78ce87286f3ae648f37170606775c791ff2b69b5b421a9cc716fa12aa86ec9b0a48643e78aab0a7b372d4f79cf362bc4b9a8b SHA512 79b43fd3cecec2393431df7d9a6720a4cff5ef24977b579dc815120262ba2a860df06ceb7e93f9c8df578fd5737a02abad4c737774cc7b9d4983567aa9ef6b3e
+EBUILD libcxxabi-15.0.0.9999.ebuild 3459 BLAKE2B e154cf8ad9a7055fb941d4b2cdc78ce87286f3ae648f37170606775c791ff2b69b5b421a9cc716fa12aa86ec9b0a48643e78aab0a7b372d4f79cf362bc4b9a8b SHA512 79b43fd3cecec2393431df7d9a6720a4cff5ef24977b579dc815120262ba2a860df06ceb7e93f9c8df578fd5737a02abad4c737774cc7b9d4983567aa9ef6b3e
MISC metadata.xml 351 BLAKE2B 9071a2cbb0eee25e4396bd720f39cd09b011e70fa4a2a87bab63801fa54d307304219a6bddc9b6fb8d0e3b32b07ea09d0419b8ea74af25d601505c3b577c656a SHA512 096b95417b8cdaeed177108ac27e54cd44c4488e8dd3b6ca0aa07f2c70fc59d42343c926d44adf54349e3f9791b9151293383e471df1282678a3c60031184d13
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-13.0.1.ebuild
index d260ea2e3450..804671c1526e 100644
--- a/sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-13.0.1.ebuild
@@ -12,7 +12,7 @@ HOMEPAGE="https://libcxxabi.llvm.org/"
LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="amd64 arm arm64 ~riscv ~x86 ~x64-macos"
IUSE="+libunwind static-libs test"
RESTRICT="!test? ( test )"
diff --git a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
index 2bd92bc0287d..577953191e5d 100644
--- a/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild
@@ -27,14 +27,18 @@ RDEPEND="
DEPEND="${RDEPEND}
>=sys-devel/llvm-6"
BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
+ ${PYTHON_DEPS}
+ test? (
+ >=sys-devel/clang-3.9.0
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
)"
-LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake cmake )
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
llvm.org_set_globals
python_check_deps() {
+ use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
@@ -44,14 +48,10 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
llvm_pkg_setup
fi
- use test && python-any-r1_pkg_setup
+ python-any-r1_pkg_setup
}
multilib_src_configure() {
- # we need a configured libc++ for __config_site
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
-
# link against compiler-rt instead of libgcc if we are using clang with libunwind
local want_compiler_rt=OFF
if use libunwind && tc-is-clang; then
@@ -64,18 +64,33 @@ multilib_src_configure() {
local libdir=$(get_libdir)
local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DLIBCXXABI_ENABLE_SHARED=ON
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
-DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
-DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
@@ -90,35 +105,20 @@ multilib_src_configure() {
cmake_src_configure
}
-wrap_libcxx() {
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- )
-
- "${@}"
+multilib_src_compile() {
+ cmake_build cxxabi
}
multilib_src_test() {
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/lib/" || die
-
local -x LIT_PRESERVES_TMP=1
cmake_build check-cxxabi
}
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
+
multilib_src_install_all() {
insinto /usr/include/libcxxabi
- doins -r include/.
+ doins -r "${WORKDIR}"/libcxxabi/include/.
}
diff --git a/sys-libs/libcxxabi/libcxxabi-13.0.1_rc3.ebuild b/sys-libs/libcxxabi/libcxxabi-14.0.0_rc4.ebuild
index d260ea2e3450..577953191e5d 100644
--- a/sys-libs/libcxxabi/libcxxabi-13.0.1_rc3.ebuild
+++ b/sys-libs/libcxxabi/libcxxabi-14.0.0_rc4.ebuild
@@ -27,14 +27,18 @@ RDEPEND="
DEPEND="${RDEPEND}
>=sys-devel/llvm-6"
BDEPEND="
- test? ( >=sys-devel/clang-3.9.0
+ ${PYTHON_DEPS}
+ test? (
+ >=sys-devel/clang-3.9.0
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
)"
-LLVM_COMPONENTS=( libcxx{abi,} llvm/cmake )
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
llvm.org_set_globals
python_check_deps() {
+ use test || return 0
has_version "dev-python/lit[${PYTHON_USEDEP}]"
}
@@ -44,14 +48,10 @@ pkg_setup() {
if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
llvm_pkg_setup
fi
- use test && python-any-r1_pkg_setup
+ python-any-r1_pkg_setup
}
multilib_src_configure() {
- # we need a configured libc++ for __config_site
- wrap_libcxx cmake_src_configure
- wrap_libcxx cmake_build generate-cxx-headers
-
# link against compiler-rt instead of libgcc if we are using clang with libunwind
local want_compiler_rt=OFF
if use libunwind && tc-is-clang; then
@@ -64,18 +64,33 @@ multilib_src_configure() {
local libdir=$(get_libdir)
local mycmakeargs=(
- -DLIBCXXABI_LIBDIR_SUFFIX=${libdir#lib}
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
-DLIBCXXABI_ENABLE_SHARED=ON
-DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
- -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
-DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
-DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
- -DLIBCXXABI_LIBCXX_INCLUDES="${BUILD_DIR}"/libcxx/include/c++/v1
# upstream is omitting standard search path for this
# probably because gcc & clang are bundling their own unwind.h
-DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
-DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
)
if use test; then
local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
@@ -90,36 +105,20 @@ multilib_src_configure() {
cmake_src_configure
}
-wrap_libcxx() {
- local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
- local CMAKE_USE_DIR=${WORKDIR}/libcxx
- local BUILD_DIR=${BUILD_DIR}/libcxx
- local mycmakeargs=(
- -DLIBCXX_LIBDIR_SUFFIX=
- -DLIBCXX_ENABLE_SHARED=OFF
- -DLIBCXX_ENABLE_STATIC=ON
- -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
- -DLIBCXX_CXX_ABI=libcxxabi
- -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${S}"/include
- -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
- -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
- -DLIBCXX_HAS_GCC_S_LIB=OFF
- -DLIBCXX_INCLUDE_TESTS=OFF
- -DLIBCXX_TARGET_TRIPLE="${CHOST}"
- )
-
- "${@}"
+multilib_src_compile() {
+ cmake_build cxxabi
}
multilib_src_test() {
- wrap_libcxx cmake_src_compile
- mv "${BUILD_DIR}"/libcxx/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
-
local -x LIT_PRESERVES_TMP=1
cmake_build check-cxxabi
}
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
+
multilib_src_install_all() {
insinto /usr/include/libcxxabi
- doins -r include/.
+ doins -r "${WORKDIR}"/libcxxabi/include/.
}
diff --git a/sys-libs/libcxxabi/libcxxabi-15.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-15.0.0.9999.ebuild
new file mode 100644
index 000000000000..577953191e5d
--- /dev/null
+++ b/sys-libs/libcxxabi/libcxxabi-15.0.0.9999.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+CMAKE_ECLASS=cmake
+PYTHON_COMPAT=( python3_{8..10} )
+inherit cmake-multilib llvm llvm.org python-any-r1 toolchain-funcs
+
+DESCRIPTION="Low level support for a standard C++ library"
+HOMEPAGE="https://libcxxabi.llvm.org/"
+
+LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )"
+SLOT="0"
+KEYWORDS=""
+IUSE="+libunwind static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ libunwind? (
+ || (
+ >=sys-libs/libunwind-1.0.1-r1[static-libs?,${MULTILIB_USEDEP}]
+ >=sys-libs/llvm-libunwind-3.9.0-r1[static-libs?,${MULTILIB_USEDEP}]
+ )
+ )"
+# llvm-6 for new lit options
+DEPEND="${RDEPEND}
+ >=sys-devel/llvm-6"
+BDEPEND="
+ ${PYTHON_DEPS}
+ test? (
+ >=sys-devel/clang-3.9.0
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]')
+ )"
+
+LLVM_COMPONENTS=( runtimes libcxx{abi,} llvm/cmake cmake )
+LLVM_TEST_COMPONENTS=( llvm/utils/llvm-lit )
+llvm.org_set_globals
+
+python_check_deps() {
+ use test || return 0
+ has_version "dev-python/lit[${PYTHON_USEDEP}]"
+}
+
+pkg_setup() {
+ # darwin prefix builds do not have llvm installed yet, so rely on bootstrap-prefix
+ # to set the appropriate path vars to LLVM instead of using llvm_pkg_setup.
+ if [[ ${CHOST} != *-darwin* ]] || has_version dev-lang/llvm; then
+ llvm_pkg_setup
+ fi
+ python-any-r1_pkg_setup
+}
+
+multilib_src_configure() {
+ # link against compiler-rt instead of libgcc if we are using clang with libunwind
+ local want_compiler_rt=OFF
+ if use libunwind && tc-is-clang; then
+ local compiler_rt=$($(tc-getCC) ${CFLAGS} ${CPPFLAGS} \
+ ${LDFLAGS} -print-libgcc-file-name)
+ if [[ ${compiler_rt} == *libclang_rt* ]]; then
+ want_compiler_rt=ON
+ fi
+ fi
+
+ local libdir=$(get_libdir)
+ local mycmakeargs=(
+ -DPython3_EXECUTABLE="${PYTHON}"
+ -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx"
+ -DLLVM_INCLUDE_TESTS=OFF
+ -DLLVM_LIBDIR_SUFFIX=${libdir#lib}
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=$(usex static-libs)
+ -DLIBCXXABI_INCLUDE_TESTS=$(usex test)
+ -DLIBCXXABI_USE_LLVM_UNWINDER=$(usex libunwind)
+ -DLIBCXXABI_USE_COMPILER_RT=${want_compiler_rt}
+
+ # upstream is omitting standard search path for this
+ # probably because gcc & clang are bundling their own unwind.h
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
+ -DLIBCXXABI_TARGET_TRIPLE="${CHOST}"
+
+ -DLIBCXX_LIBDIR_SUFFIX=
+ -DLIBCXX_ENABLE_SHARED=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+ -DLIBCXX_CXX_ABI=libcxxabi
+ -DLIBCXX_CXX_ABI_INCLUDE_PATHS="${WORKDIR}"/libcxxabi/include
+ -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF
+ -DLIBCXX_HAS_MUSL_LIBC=$(usex elibc_musl)
+ -DLIBCXX_HAS_GCC_S_LIB=OFF
+ -DLIBCXX_INCLUDE_BENCHMARKS=OFF
+ -DLIBCXX_INCLUDE_TESTS=OFF
+ -DLIBCXX_TARGET_TRIPLE="${CHOST}"
+ )
+ if use test; then
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+
+ mycmakeargs+=(
+ -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+ -DLLVM_LIT_ARGS="$(get_lit_flags);--param=cxx_under_test=${clang_path}"
+ -DPython3_EXECUTABLE="${PYTHON}"
+ )
+ fi
+ cmake_src_configure
+}
+
+multilib_src_compile() {
+ cmake_build cxxabi
+}
+
+multilib_src_test() {
+ local -x LIT_PRESERVES_TMP=1
+ cmake_build check-cxxabi
+}
+
+multilib_src_install() {
+ DESTDIR="${D}" cmake_build install-cxxabi
+}
+
+multilib_src_install_all() {
+ insinto /usr/include/libcxxabi
+ doins -r "${WORKDIR}"/libcxxabi/include/.
+}