summaryrefslogtreecommitdiff
path: root/sys-libs/llvm-libunwind
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-18 04:54:42 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-18 04:54:42 +0000
commit5510d9d7d1c93c2ea71a2bd6f0666168808d5dd6 (patch)
treec968fff3108e2b4d88e4e564a56bfd066f170573 /sys-libs/llvm-libunwind
parent1dde4e5c4b92d849bf1abf0a48135b2a0644f7e1 (diff)
gentoo resync : 18.03.2018
Diffstat (limited to 'sys-libs/llvm-libunwind')
-rw-r--r--sys-libs/llvm-libunwind/Manifest7
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild74
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild67
-rw-r--r--sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild67
4 files changed, 183 insertions, 32 deletions
diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest
index 3d5da1dc4041..125782d324e5 100644
--- a/sys-libs/llvm-libunwind/Manifest
+++ b/sys-libs/llvm-libunwind/Manifest
@@ -1,6 +1,7 @@
AUX libunwind-3.8-cmake.patch 3454 BLAKE2B adb76914f1d08a4434c9d8aaed170e5067c3758d94c658a3a838d644a63e1eda946211c6962a75eea64b828ed60217521d8dcbcc60ad1356e1b667776aa771da SHA512 5d0a72e91a99e60f22239d56bf0998b0ae1df448ebf461c00bf6fe9eed0fa0579041bd98a9b50dfbe2d6a4490bbb8ede5c9b2fe76743f9f5b84770b4563377f1
AUX libunwind-3.9-cmake-static-lib.patch 1855 BLAKE2B 9ca4a2e8b8bdf3b9bcd8d2abda1ed1d5683f34b093347d01d383eb7f1ee65cf0100a740cde2511df3a81130c0b25604bf070f572c7c0629f6e81faf9263f45cb SHA512 1d0c5859394d027fd0b30ae30caa0aaee94e3880a16d1f46f318221f3062e126c25c6f20cdf087dc9b37d92517df499b0f79294a6e17c8ac5da694c0d825e9bc
DIST libcxx-6.0.0.src.tar.xz 1549328 BLAKE2B 93adb339b0e849fca1850d379c8e74b407b0db8220f3a05f888db70d83ad07c3200dbd2a7827f92c60a2ba91d3395e4d1b4434ba70479c29a95aceda6c213e02 SHA512 3d93910f85a778f36c5f7a4429639008acba5713a2c8ac79a9de09463af6f9a388af45d39af23423a7223660701697ba067f3391f25d5a970973691dd88635e3
+DIST libcxxabi-6.0.0.src.tar.xz 529212 BLAKE2B ae020e8831a6ae71d59d71e294bbb0aa6dbedf1b3036b2536d9456db8c51f21e57d082c5abf5e00921a14876328bdfafab3c04b4d761cb76d52e35ff97107510 SHA512 c5e4cc05105770b42b20595fdbda5e1483be4582bc94335da1a15531ba43a0ecf30e1e0a252f62d4d0e6c79cda9d44ff5fdbe69a0a295b2431fd6de158410e2e
DIST libunwind-3.8.1.src.tar.xz 60596 BLAKE2B e200beab1388dc73a4ed6b1be0c4931124e48e21a3d5cc0bf01ac2ce57bbc2295bd0f72acb8fc08556aed963f0cb220bd3e47c3c953f570cf2860ae822a270c7 SHA512 2a60d7c4b0aee6c58f50089ac9fa2b756ab1d74faaee32f7436ddace4510589c7ffdd20478919966ed2fa8a23ee1b5d1b26115dbd8ee2834b00b5bcd61d00b14
DIST libunwind-3.9.0.src.tar.xz 61764 BLAKE2B 215aa7cabf9e5d8d3e3dfc3bad50f0aad1b4d2d6bef96ac4c14d987b6aa4afd0a1c0f186d63d84edcc822fd8495a000b2a24899e61176831e0ddfabea1d5c3c2 SHA512 dce384bea99ed61b363b847e20946fc9d70377389a227cc7054fbaa916e7cb5ba0b9d89f0df6ed33409dbf38beefd3654c18c1abcf0e50b5d0315ce0135a1d25
DIST libunwind-3.9.1.src.tar.xz 61788 BLAKE2B bab410d714e2dc012273997bb3fb3c366f64608b712eae15f8c08a2b049b6bdba0660a1f4942906e2e9cd7b11563c8a5b3007b92b1485c32036ac84f55fe7053 SHA512 a80f5d0660e209f5bf709316b5df2ca63b9f0db49f5f74dfe9c9e580c654f61a15acc071a739fdb84baf5ffa9420b92498f8560331173642d80f6b74e1e2afb7
@@ -12,7 +13,7 @@ EBUILD llvm-libunwind-3.9.0-r1.ebuild 1182 BLAKE2B 8a01875c7c57c4c4052d0bc680794
EBUILD llvm-libunwind-3.9.1.ebuild 1187 BLAKE2B adc3bdff94f0b5a855c4d6eac0ee123dbdc845da541d06fb6f3d533a0375d969427488cbbb4bcef4d545c8e6993ab4c78a8c5f3bca9f06f2b36a84199e471b0c SHA512 bdd65eb012df3af046c71406af02927255f3502aaf92e53fa9dbf2adfa0150b68e4325cfef2f07d1893738ba6ba3f009a89e37861ffe7999752ea77fc3963a0b
EBUILD llvm-libunwind-4.0.1.ebuild 1094 BLAKE2B dec5d0847983833e461635ac5711b5d253963650aed87678277bec86d1334ae9348d26605e20acf2a8d2405e891dd10c9303abf7d243ed86e36c8f3e3f12b83b SHA512 3fb7283eea0b4282c549d7cf2cee1aea0f9d28b7689f5b83a32893c32ebfabc703eb0328593109db96a86351b639bc3e60572c7de93fbed18dd359a14b352386
EBUILD llvm-libunwind-5.0.1.ebuild 1094 BLAKE2B 3378498096da36b9cbd6e70c9f2646cf6215f6d964e0a991e389c33af1a1614bc0c0dd404b58141d64513a22709e1755c79f4466b3cf7b43515f623927f766f0 SHA512 cd9740fad0a59488d543fa2af2a2908457180840999d463071bb557d45214e0cf04069f922e90e0a3b3f8144b8966d2f3564c098561a2ae0511264d1eb2b104a
-EBUILD llvm-libunwind-6.0.0.ebuild 2412 BLAKE2B fab8d1db68f1b04ff98c45357a642b7093a8a98322ff494d4c05bedbf4abcd00e06c9cfc6b13584fb433b694e4300321dae6d11a3d0bfd7155df241cb0e6ba91 SHA512 729924a13ed898c500c95e1388d58726cd285fa5644d793b02a5ad4f71a83b6286f04634bfc1aaebd837f6d55e1d81afd5f26367e2ab853bfae4ffb90a224fec
-EBUILD llvm-libunwind-6.0.9999.ebuild 2355 BLAKE2B 9d4339c8b1f716a1062948c179198d2499d4831aa9ce2805c301831dc27a5839f15bcdb0965c4c6865d7c528d04f0e923f3cf18aff8948b885cf800a9ac6ed82 SHA512 3f5bde87934cc8a21eb8b4eefba1b5ecc60bedbd6aef3e98ddbd313acab5b2d30d3f0aca75dad890053824b2220ac5ff714ef9e4c1be2e1b65e4b6bdceb8b3ad
-EBUILD llvm-libunwind-9999.ebuild 2330 BLAKE2B 477d3a8aac1fa2434121e516df401c8c174b088d67e111e7e853e6770df93c14bb0ce48f9a31b80b45f980e31ffcb197e0b804b010dc191e1d41467218c332ed SHA512 a911d774c6d313a1002fefc743f3057d5ff23ef89f611a492f975a44f58a3c3b84c332759c869e50f4a2d2641b21c9c0bd3d7a8101593d4a0114a33a164a9ddb
+EBUILD llvm-libunwind-6.0.0.ebuild 3744 BLAKE2B bd6b480a65c15c7d38043a4267bf1e02435a403a87b3280716e2de1e5dcf3bde6318bf7e361e309c3382b47a690b2a6fc42fd73c5c428ab0c70bbed62ad46ac6 SHA512 3095db45a2689d0a9fa6cc5550f5a897d2de00e3cbd07417e71e52dec301850d90a8e1f9dfd202c9f6485a9941d194704cf69825ff3e6252ebd73d32635c9a17
+EBUILD llvm-libunwind-6.0.9999.ebuild 3885 BLAKE2B 0a6078aeaf1af824ec3924fe5935f3710db2cc3d17bc338feb7c66ad7f478ffa9939e3c2e7c4095bb81923d6253c4806eb886f2309967e0c9f768a4777f87c37 SHA512 9424218fb904b44e796780db42471a52d3f2de7e08077054d5d8d6075ea041bf906a0ac6bc8fc0b6fffb0fcf6de3a543fb3567f4ef33f69f3b77e24ec4991004
+EBUILD llvm-libunwind-9999.ebuild 3860 BLAKE2B 177f9e223b61e3bd3a6fec78ff0b3d2efa1220228d55f78eb41a200518441d8b617998f13642338e91ff3f56dd224c1e1382df5031060c1783440ad20223d069 SHA512 b0cdcbe531188ffa9f7e294136a9238a79441b0768144116784fbf3e647b3fef11eb6a4e5569f08e7e7092d4aec46843c15a1c2b3b96ec63ee64028a0fb29c83
MISC metadata.xml 302 BLAKE2B 1cdee7813ed9a3766b2eddccd14f9e0576ba5cc7f812d7af4f35c8c2e5991790f3800c6473c37da90d72804832fd9af969a2e3bf7aa625f0d3a32da1dbcefacf SHA512 3afaef82e6a495a81e221524ae7604dc170ef5c103333728674faf0417c45ba7996118c10466eaa24f8feef9ed8f0fc60d535a5195462317d61c61a531c8a285
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild
index b895e49449da..a276429001f4 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild
@@ -11,27 +11,26 @@ inherit cmake-multilib llvm multiprocessing python-any-r1
MY_P=libunwind-${PV/_/}.src
LIBCXX_P=libcxx-${PV/_/}.src
+LIBCXXABI_P=libcxxabi-${PV/_/}.src
DESCRIPTION="C++ runtime stack unwinder from LLVM"
HOMEPAGE="https://github.com/llvm-mirror/libunwind"
SRC_URI="https://releases.llvm.org/${PV/_//}/${MY_P}.tar.xz
- test? ( https://releases.llvm.org/${PV/_//}/${LIBCXX_P}.tar.xz )"
+ test? (
+ https://releases.llvm.org/${PV/_//}/${LIBCXX_P}.tar.xz
+ https://releases.llvm.org/${PV/_//}/${LIBCXXABI_P}.tar.xz )"
LICENSE="|| ( UoI-NCSA MIT )"
SLOT="0"
-KEYWORDS="~amd64 ~x86 ~amd64-fbsd"
+KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-fbsd"
IUSE="debug +static-libs test"
RESTRICT="!test? ( test )"
RDEPEND="!sys-libs/libunwind"
# llvm-6 for new lit options
-# tests need libcxx with implicit -lunwind and libcxxabi
-# (but libcxx does not need to be built against it)
DEPEND="
>=sys-devel/llvm-6
- test? (
- sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}]
- sys-libs/libcxxabi
+ test? ( >=sys-devel/clang-3.9.0
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
S=${WORKDIR}/${MY_P}
@@ -48,14 +47,11 @@ pkg_setup() {
}
src_unpack() {
- einfo "Unpacking ${MY_P}.tar.xz ..."
- tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die
+ default
if use test; then
- einfo "Unpacking parts of ${LIBCXX_P}.tar.xz ..."
- tar -xf "${DISTDIR}/${LIBCXX_P}.tar.xz" \
- "${LIBCXX_P}"/{include,utils/libcxx} || die
mv "${LIBCXX_P}" libcxx || die
+ mv "${LIBCXXABI_P}" libcxxabi || die
fi
}
@@ -73,9 +69,14 @@ multilib_src_configure() {
-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
)
if use test; then
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+ local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
+
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+
mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
-DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx
)
fi
@@ -83,7 +84,54 @@ multilib_src_configure() {
cmake-utils_src_configure
}
+build_libcxxabi() {
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
+ local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
+ local BUILD_DIR=${BUILD_DIR}/libcxxabi
+ local mycmakeargs=(
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=OFF
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
+ )
+
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+}
+
+build_libcxx() {
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -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=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -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_TESTS=OFF
+ )
+
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+}
+
multilib_src_test() {
+ # build local copies of libc++ & libc++abi for testing to avoid
+ # circular deps
+ build_libcxxabi
+ build_libcxx
+ mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
+
cmake-utils_src_make check-unwind
}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild
index 6eb95d733fc2..303cfec21c9c 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild
@@ -24,13 +24,9 @@ RESTRICT="!test? ( test )"
RDEPEND="!sys-libs/libunwind"
# llvm-6 for new lit options
-# tests need libcxx with implicit -lunwind and libcxxabi
-# (but libcxx does not need to be built against it)
DEPEND="
>=sys-devel/llvm-6
- test? (
- sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}]
- sys-libs/libcxxabi
+ test? ( >=sys-devel/clang-3.9.0
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
# least intrusive of all
@@ -45,16 +41,19 @@ pkg_setup() {
}
src_unpack() {
- # we need headers & test utilities
if use test; then
git-r3_fetch "https://git.llvm.org/git/libcxx.git
https://github.com/llvm-mirror/libcxx.git"
+ git-r3_fetch "https://git.llvm.org/git/libcxxabi.git
+ https://github.com/llvm-mirror/libcxxabi.git"
fi
git-r3_fetch
if use test; then
git-r3_checkout https://llvm.org/git/libcxx.git \
- "${WORKDIR}"/libcxx '' include utils/libcxx
+ "${WORKDIR}"/libcxx
+ git-r3_checkout https://llvm.org/git/libcxxabi.git \
+ "${WORKDIR}"/libcxxabi
fi
git-r3_checkout
}
@@ -73,9 +72,14 @@ multilib_src_configure() {
-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
)
if use test; then
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+ local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
+
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+
mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
-DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx
)
fi
@@ -83,7 +87,54 @@ multilib_src_configure() {
cmake-utils_src_configure
}
+build_libcxxabi() {
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
+ local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
+ local BUILD_DIR=${BUILD_DIR}/libcxxabi
+ local mycmakeargs=(
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=OFF
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
+ )
+
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+}
+
+build_libcxx() {
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -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=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -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_TESTS=OFF
+ )
+
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+}
+
multilib_src_test() {
+ # build local copies of libc++ & libc++abi for testing to avoid
+ # circular deps
+ build_libcxxabi
+ build_libcxx
+ mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
+
cmake-utils_src_make check-unwind
}
diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild
index 387b8c31086c..366cb0231027 100644
--- a/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild
+++ b/sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild
@@ -23,13 +23,9 @@ RESTRICT="!test? ( test )"
RDEPEND="!sys-libs/libunwind"
# llvm-6 for new lit options
-# tests need libcxx with implicit -lunwind and libcxxabi
-# (but libcxx does not need to be built against it)
DEPEND="
>=sys-devel/llvm-6
- test? (
- sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}]
- sys-libs/libcxxabi
+ test? ( >=sys-devel/clang-3.9.0
$(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
# least intrusive of all
@@ -44,16 +40,19 @@ pkg_setup() {
}
src_unpack() {
- # we need headers & test utilities
if use test; then
git-r3_fetch "https://git.llvm.org/git/libcxx.git
https://github.com/llvm-mirror/libcxx.git"
+ git-r3_fetch "https://git.llvm.org/git/libcxxabi.git
+ https://github.com/llvm-mirror/libcxxabi.git"
fi
git-r3_fetch
if use test; then
git-r3_checkout https://llvm.org/git/libcxx.git \
- "${WORKDIR}"/libcxx '' include utils/libcxx
+ "${WORKDIR}"/libcxx
+ git-r3_checkout https://llvm.org/git/libcxxabi.git \
+ "${WORKDIR}"/libcxxabi
fi
git-r3_checkout
}
@@ -72,9 +71,14 @@ multilib_src_configure() {
-DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON
)
if use test; then
+ local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+ local jobs=${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}
+
+ [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+
mycmakeargs+=(
-DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
- -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}"
+ -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}"
-DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx
)
fi
@@ -82,7 +86,54 @@ multilib_src_configure() {
cmake-utils_src_configure
}
+build_libcxxabi() {
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/$(get_libdir)"
+ local CMAKE_USE_DIR=${WORKDIR}/libcxxabi
+ local BUILD_DIR=${BUILD_DIR}/libcxxabi
+ local mycmakeargs=(
+ -DLIBCXXABI_LIBDIR_SUFFIX=
+ -DLIBCXXABI_ENABLE_SHARED=ON
+ -DLIBCXXABI_ENABLE_STATIC=OFF
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -DLIBCXXABI_INCLUDE_TESTS=OFF
+
+ -DLIBCXXABI_LIBCXX_INCLUDES="${WORKDIR}"/libcxx/include
+ -DLIBCXXABI_LIBUNWIND_INCLUDES="${S}"/include
+ )
+
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+}
+
+build_libcxx() {
+ local -x LDFLAGS="${LDFLAGS} -L${BUILD_DIR}/libcxxabi/lib -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=ON
+ -DLIBCXX_ENABLE_STATIC=OFF
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF
+ -DLIBCXXABI_USE_LLVM_UNWINDER=ON
+ -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_TESTS=OFF
+ )
+
+ cmake-utils_src_configure
+ cmake-utils_src_compile
+}
+
multilib_src_test() {
+ # build local copies of libc++ & libc++abi for testing to avoid
+ # circular deps
+ build_libcxxabi
+ build_libcxx
+ mv "${BUILD_DIR}"/libcxx*/lib/libc++* "${BUILD_DIR}/$(get_libdir)/" || die
+
cmake-utils_src_make check-unwind
}