[PATCH] D113610: [cmake] Add option LLVM_ENABLE_VISIBILITY_MACROS

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 14:09:04 PST 2021


dexonsmith added a comment.

In D113610#3125742 <https://reviews.llvm.org/D113610#3125742>, @benlangmuir wrote:

>> Part of me wants to say that we should make these visibility macros conditional on the existing LLVM_ENABLE_DYLIB (sp?) option. If the user is statically linking LLVM, we should drop these annotations and allow the global visibility preset to take precedence.
>
> This approach would work fine for my use case and I'm happy to go this way if that's the consensus.  The reason I went with the separate option is that I could imagine an alternative use case where you're "wrapping" llvm into your own dylib, in which case you might have the same reasons to use these options as LLVM's own dylib build does.

My guess would be that the alternative use case you're proposing is pretty rare, in which case @rnk's suggestion SGTM. Later, if someone comes across it, we can add the flag to override the default (which would still depend on shared vs. static).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113610/new/

https://reviews.llvm.org/D113610



More information about the llvm-commits mailing list