Modify the ebuild to no longer enforce externally installed
dev-python/lit for tests, effectively causing the build system to use
the bundled copy of lit (along with llvm-lit). While using the external
package is more canonical, its disadvantages outweight the gain.
Most notably, lit is not slotted in Gentoo and the behavior of lit
frequently changes subtly which caused us to require a major version
match between LLVM and lit. As a result, attempting to build multiple
slots of LLVM with tests enabled cause package collisions. Building both
LLVM and lit simultaneously causes a circular dependency.
Since lit comes from the same package as LLVM and clang requires it
anyway for gtest, using the bundled copy has no added cost.
However, the live ebuild is currently broken as it requires llvm-lit
that is not created in the stand-alone build. This will be fixed
upstream.
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx )
- test? ( ~dev-python/lit-${PV}[${PYTHON_USEDEP}] )
xml? ( virtual/pkgconfig )
!!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
)
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
)
if multilib_is_native_abi; then
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx )
- test? ( ~dev-python/lit-${PV}[${PYTHON_USEDEP}] )
xml? ( virtual/pkgconfig )
!!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
)
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLIT_COMMAND="${EPREFIX}/usr/bin/lit"
)
if multilib_is_native_abi; then
# configparser-3.2 breaks the build (3.3 or none at all are fine)
DEPEND="${RDEPEND}
doc? ( dev-python/sphinx )
- test? ( ~dev-python/lit-${PV}[${PYTHON_USEDEP}] )
xml? ( virtual/pkgconfig )
!!<dev-python/configparser-3.3.0.2
${PYTHON_DEPS}"
)
use test && mycmakeargs+=(
-DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
- -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit"
-DLLVM_LIT_ARGS="-vv"
)