[PATCH] D26894: [llvm-config] Add --cmakedir to obtain CMake module location

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 23:44:15 PST 2016


mgorny added a comment.

In https://reviews.llvm.org/D26894#601053, @beanz wrote:

> I'm curious what your use case for this is. I actually think this, and your other patch are moving in the opposite direction from how I would like to see this move.


My use case is that I'm working on adding x32 support and some of the runtime packages (libunwind, libcxx, libcxxabi) look for LLVM cmake files in LLVM_LIBDIR_SUFFIX. I don't want to unnecessarily copy them to libx32 when those packages don't really depend on LLVM itself and therefore are entirely happy with the native files from lib64.

While this could be solved in a number of ways, this seemed the simplest and most in-line with how other directories are obtained.

However, it might be cleaner to split the CMake files between arch-specific and arch-independent, and install them both to lib* and share appropriately. If we want to go this route, indeed --cmakedir would be conflicting with the goal of having two directories to add.

> I'd like to see us move in the direction where we can rely on the CMake `find_package` mechanism entirely instead of on llvm-config.

I don't really see one preventing the other. I can look at the `find_package` solution at some point but right now I certainly don't have time for that.


https://reviews.llvm.org/D26894





More information about the llvm-commits mailing list