[llvm] [llvm-c] Guard include of llvm-config in Visibility.h (PR #154229)
Saleem Abdulrasool via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 21 10:16:54 PDT 2025
compnerd wrote:
> Do you have a suggestion on how to isolate only the module declaration for `LLVM_Config_Config` in this tree, so we wouldn't need to at installation time downstream? Part of what's appealing to me about a has_include or basic `LLVM_ABI` fallback is that it reduces the amount of internal changes required.
Are you asking how to make it easy to consume standalone downstream or how to avoid the header downstream entirely?
The module has no dependencies, the content of the file is simply the configuration that was passed to cmake (i.e., it is just a series of `#define` and comments). So, this should have little to no challenge for downstream consumers.
If the question is to how to avoid the dependency on `llvm/Config/llvm-config.h` entirely - I think that would require that we change `llvm-c/Visibility.h` to a preprocessed header that is written out by CMake. It ends up being the same situation as the current thing in that we would need to install a generated header.
https://github.com/llvm/llvm-project/pull/154229
More information about the llvm-commits
mailing list