LLVM can be installed in a slotted way. This is really nice. However, in the current way it makes it difficult for developers to access the correct library version. Currently llvm (and clang) binaries are installed in /usr/lib/llvm/${PV}/bin. All versions are then taken into the PATH. This has the effect that invoking tools like "clang" always lead to the newest version but make invoking "clang-7", "clang-6", ... possible because they are installed as symlinks. The problem is that linking/developing against llvm needs llvm-config and this tool has no symlinks, so the newest llvm-config hides all other. Please provide additional symlinks to llvm-config with the version appended: ln -s llvm-config llvm-config-6 ln -s llvm-config llvm-config-6.0 This makes the library version directly accessible for developers and mimics the tooling on Debian/Ubuntu that also provide such a link.
Please get this upstream. I won't be introducing a hack that people will start implicitly relying on, effectively making their programs work correctly only on Gentoo (and possibly Debuntu).
Reported: https://bugs.llvm.org/show_bug.cgi?id=41794
Upstream seems not interested in it. This is pending for two releases now and not triggering a single response. I guess, the solution are a few lines in the build system. Are you aware enough of the build system to give me a hint, how to patch this. Then I'm able to bring it to upstream myself.
You're looking for llvm/tools/llvm-config, I guess. If I were to do it, I'd rename llvm-config tool (grep for LLVM_VERSION* vars), and then create a symlink. I think upstream's doing some symlinks for clang, so you could look at how they're doing it.