What determines which target information makes it into an install tree Exports.cmake file?

[Sorry to duplicate-post this; it seems like slightly more of a CMake question than an LLVM question, but the original LLVM posting is here. Feel free to answer there if it seems more appropriate.]

I am trying to create a distribution of LLVM library binaries along with the necessary CMake support libraries so that another CMake-based project can link against those libraries. It seems as though somewhere between the version in the build tree and the one in the install tree, information about crucial LLVM libraries is stripped from LLVMExports.cmake. For example, the string LLVMSupport doesn’t appear anywhere in the installed edition of this file. I can’t for the life of me figure out what controls which libraries end up listed in the installed edition. It looks like just LTO in my case. That /is/ included in LLVM_DISTRIBUTION_COMPONENTS , but adding support there has no effect. Can someone help? My build procedure on Windows is here, FWIW.

I feel like this is an LLVM thing; I commented over on the LLVM thread with a link to a function that may help rename the confusing variable(s).

1 Like