sys-libs/compiler-rt-sanitizers: Fix running unsandbox+lit correctly
authorMichał Górny <mgorny@gentoo.org>
Sun, 1 Oct 2017 11:35:41 +0000 (13:35 +0200)
committerMichał Górny <mgorny@gentoo.org>
Sun, 1 Oct 2017 12:00:18 +0000 (14:00 +0200)
sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9999.ebuild

index c656e22061b4eb95c76a1a07931fc9d9e132f3be..aec72902a47f64dfd280ce5991afdc8c09ef0863 100644 (file)
@@ -86,10 +86,15 @@ src_configure() {
                -DCOMPILER_RT_BUILD_XRAY=ON
        )
        if use test; then
+               cat > "${T}"/unsandbox-lit.py <<-EOF || die
+                       import os, sys
+                       os.execlp("unsandbox", sys.argv[0], "lit", *sys.argv[1:])
+               EOF
+
                mycmakeargs+=(
                        -DLLVM_MAIN_SRC_DIR="${WORKDIR}/llvm"
-                       -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/unsandbox"
-                       -DLLVM_LIT_ARGS="lit;-vv"
+                       -DLLVM_EXTERNAL_LIT="${T}/unsandbox-lit.py"
+                       -DLLVM_LIT_ARGS="-vv"
 
                        # they are created during src_test()
                        -DCOMPILER_RT_TEST_COMPILER="${BUILD_DIR}/lib/llvm/${LLVM_SLOT}/bin/clang"