sys-libs/libcxxabi: Fix calling lit with llvm-6+ installed
authorMichał Górny <mgorny@gentoo.org>
Thu, 15 Mar 2018 20:44:01 +0000 (21:44 +0100)
committerMichał Górny <mgorny@gentoo.org>
Thu, 15 Mar 2018 21:12:43 +0000 (22:12 +0100)
sys-libs/libcxxabi/libcxxabi-4.0.1.ebuild
sys-libs/libcxxabi/libcxxabi-5.0.1.ebuild

index 0610e34243718360060031276eb19781643c9a41..23c9c3a7137dafb7d473632568c653cca6e7ba50 100644 (file)
@@ -72,9 +72,15 @@ multilib_src_configure() {
                -DLIBCXXABI_LIBUNWIND_SOURCES="${T}"
        )
        if use test; then
-               mycmakeargs+=(
-                       -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
-               )
+               if has_version '>=sys-devel/llvm-6'; then
+                       mycmakeargs+=(
+                               -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+                       )
+               else
+                       mycmakeargs+=(
+                               -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
+                       )
+               fi
        fi
        cmake-utils_src_configure
 }
index b273a72c3cc1da84cb1ff2b38d90d74814977503..9af30980d38c12fc77aa7e68f715b8d2e4b2ed60 100644 (file)
@@ -76,9 +76,15 @@ multilib_src_configure() {
                -DLIBCXXABI_LIBUNWIND_INCLUDES="${EPREFIX}"/usr/include
        )
        if use test; then
-               mycmakeargs+=(
-                       -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
-               )
+               if has_version '>=sys-devel/llvm-6'; then
+                       mycmakeargs+=(
+                               -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
+                       )
+               else
+                       mycmakeargs+=(
+                               -DLIT_COMMAND="${EPREFIX}"/usr/bin/lit
+                       )
+               fi
        fi
        cmake-utils_src_configure
 }