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

index 8b6e05f5ff3d179b79ae64fff7b3daf311916701..64f610ce5bb2b9dfdd6904c628cf1fce51c0a635 100644 (file)
@@ -127,8 +127,16 @@ multilib_src_configure() {
                        # this can be any directory, it just needs to exist...
                        # FIXME: remove this once https://reviews.llvm.org/D25093 is merged
                        -DLLVM_MAIN_SRC_DIR="${T}"
-                       -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 ff69acef17923142956fc8c15866bb9b236b7933..885f8b1318263db29f88f698948a18a95caa6bd6 100644 (file)
@@ -127,8 +127,16 @@ multilib_src_configure() {
                        # this can be any directory, it just needs to exist...
                        # FIXME: remove this once https://reviews.llvm.org/D25093 is merged
                        -DLLVM_MAIN_SRC_DIR="${T}"
-                       -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
 }