Ensure that the LLVM slot with matching clang version is always used.
Otherwise, if you have a newer LLVM slot without clang, and an older
slot with clang, libclc got paths from the newer llvm-config and was
unable to find clang. Now the ebuild finds clang first, and uses
the llvm-config installed alongside it.
${PYTHON_DEPS}"
src_configure() {
+ # we need to find llvm with matching clang version, so look for
+ # clang first, and then use llvm-config from the same location
+ local clang_path=$(type -P clang) || die
+
./configure.py \
--with-cxx-compiler="$(tc-getCXX)" \
- --with-llvm-config="$(type -P llvm-config)" \
+ --with-llvm-config="${clang_path%/*}/llvm-config" \
--prefix="${EPREFIX}/usr" || die
}