To compile with LLVM inside the container, the expectation so far was
that the user would do:
export LLVM="${CROSS_COMPILE_llvm}"
This is confusing as CROSS_COMPILE is gcc-only and needlessly
cumbersome. The Makefile also accepts LLVM_PREFIX and LLVM_SUFFIX
variables. The utilities are already in PATH, so just set LLVM_SUFFIX to
the correct. -${LLVM_VERSION} suffix.
Users will then have to only set
export LLVM=1
and GCC builds continue to be unaffected as LLVM_SUFFIX/PREFIX are only
evaluated if ${LLVM} is non-empty.
Signed-off-by: Ahmad Fatoum <[email protected]>
---
test/Containerfile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/Containerfile b/test/Containerfile
index 6e4515f7d582..fc1d8f5f9671 100644
--- a/test/Containerfile
+++ b/test/Containerfile
@@ -107,7 +107,7 @@ ENV
CROSS_COMPILE_powerpc=/opt/gcc-${GCC_VERSION}-nolibc/powerpc-linux/bin/power
ENV
CROSS_COMPILE_riscv=/opt/gcc-${GCC_VERSION}-nolibc/riscv64-linux/bin/riscv64-linux-
ENV CROSS_COMPILE_kvx=/opt/gcc-kalray-kvx-v5.2.0/bin/kvx-elf-
-ENV CROSS_COMPILE_llvm=-${LLVM_VERSION}
+ENV LLVM_SUFFIX=-${LLVM_VERSION}
# Workaround for https://github.com/llvm/llvm-project/issues/112458
RUN ln -Ts /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/linux/ \
/usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/x86_64-pc-linux-gnu
--
2.47.3