Skip to content

Commit 9844558

Browse files
committed
devel::llvm: use correct llvm-config when cross compiling
When llvm is cross-compiled, the llvm-config executable is built for the target architecture. We pass a copy of llvm-config in devel::llvm-libs-dev which apparently requires a version that can be executed on the build machine. Use the one from the host-tool package unless llvm is not cross compiled.
1 parent 64c16c7 commit 9844558

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

recipes/devel/llvm.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,13 @@ multiPackage:
283283
/usr/ /usr/lib/ /usr/lib/{clang,llvm}/"***" \
284284
/usr/bin/ /usr/bin/llvm-config
285285
286+
# If we're cross-compiling, we need to take
287+
# llvm-config from the host-tools package so that
288+
# it can be executed at build time.
289+
if [[ ${BOB_TOOL_PATHS[clang-host]:+true} ]] ; then
290+
cp ${BOB_TOOL_PATHS[clang-host]}/llvm-config usr/bin/
291+
fi
292+
286293
# Add some wrapper scripts for all executables,
287294
# except llvm-config. The CMake exported targets
288295
# expect them relative to them and check this!

0 commit comments

Comments
 (0)