sys-libs/libcxx: Pass cxx_under_test via --param (in 6+)
authorMichał Górny <mgorny@gentoo.org>
Fri, 16 Mar 2018 09:20:06 +0000 (10:20 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 16 Mar 2018 09:32:45 +0000 (10:32 +0100)
sys-libs/libcxx/libcxx-6.0.0.ebuild
sys-libs/libcxx/libcxx-6.0.9999.ebuild
sys-libs/libcxx/libcxx-9999.ebuild

index 284a0aa9eb514a99d6f2501224e238adedd24e9a..5301d5f1fe6c3075cd81836297361ba1f4adaddc 100644 (file)
@@ -139,20 +139,20 @@ multilib_src_configure() {
        )
 
        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}"
                )
        fi
        cmake-utils_src_configure
 }
 
 multilib_src_test() {
-       local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
-
-       [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-       sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
-
        cmake-utils_src_make check-libcxx
 }
 
index 4e687c722c6036cf0ef97f488867368ca02db18c..7454f776ff64f28a6a7c78581227f086aeaa8e3a 100644 (file)
@@ -151,20 +151,20 @@ multilib_src_configure() {
        )
 
        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}"
                )
        fi
        cmake-utils_src_configure
 }
 
 multilib_src_test() {
-       local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
-
-       [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-       sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
-
        cmake-utils_src_make check-libcxx
 }
 
index f304a076c171848f70de09b120140d366102596e..a4fdb61c8c7db7f3b1cb9167df06d7f6bd5e2905 100644 (file)
@@ -150,20 +150,20 @@ multilib_src_configure() {
        )
 
        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}"
                )
        fi
        cmake-utils_src_configure
 }
 
 multilib_src_test() {
-       local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
-
-       [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
-       sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
-
        cmake-utils_src_make check-libcxx
 }