summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-06-14 01:39:07 +0100
committerSam James <sam@gentoo.org>2023-06-15 22:47:19 +0100
commit8e9c05ddfcd74be3b53c7c4c2fbc799a9ab7fa61 (patch)
tree8f3efae0a3bcc202e77d87553f07032bb06ed34d /eclass/llvm.eclass
parentprofiles: mask sys-auth/polkit-pkla-compat on musl profile (diff)
downloadgentoo-8e9c05ddfcd74be3b53c7c4c2fbc799a9ab7fa61.tar.gz
gentoo-8e9c05ddfcd74be3b53c7c4c2fbc799a9ab7fa61.tar.bz2
gentoo-8e9c05ddfcd74be3b53c7c4c2fbc799a9ab7fa61.zip
llvm.eclass: export LLVM_CONFIG if not cross-compiling
Set LLVM_CONFIG to help Meson (bug #907965) but only do it for empty ESYSROOT (as a proxy for "are we cross-compiling?"). Closes: https://bugs.gentoo.org/907965 Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31429 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/llvm.eclass')
-rw-r--r--eclass/llvm.eclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/eclass/llvm.eclass b/eclass/llvm.eclass
index 022820d012d5..223e2a15baf4 100644
--- a/eclass/llvm.eclass
+++ b/eclass/llvm.eclass
@@ -250,6 +250,12 @@ llvm_pkg_setup() {
llvm_fix_tool_path ADDR2LINE AR AS LD NM OBJCOPY OBJDUMP RANLIB
llvm_fix_tool_path READELF STRINGS STRIP
+ # Set LLVM_CONFIG to help Meson (bug #907965) but only do it
+ # for empty ESYSROOT (as a proxy for "are we cross-compiling?").
+ if [[ -z ${ESYSROOT} ]] ; then
+ llvm_fix_tool_path LLVM_CONFIG
+ fi
+
local prefix=${ESYSROOT}
local llvm_path=${prefix}/usr/lib/llvm/${LLVM_SLOT}/bin
local IFS=: