[PATCH] D113610: [cmake] Add option LLVM_ENABLE_VISIBILITY_MACROS

Louis Dionne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 9 14:01:39 PST 2021


ldionne added a comment.

I don't have a horse in this race since this is LLVM and not libc++, however from a user perspective, it would feel more ergonomic to have a single setting like `LLVM_VISIBILITY=normal|hidden`. Or something like `LLVM_HIDDEN_VISIBILITY=ON` (by default it's `OFF`, which means default visibility is used).

Heck, thinking about it, why does LLVM even override what's decided by `CMAKE_CXX_VISIBILITY_PRESET`? It seems to me that:

- `LLVM_LIBRARY_VISIBILITY` should always be `hidden`, and
- `LLVM_EXTERNAL_VISIBILITY` should be whatever `CMAKE_CXX_VISIBILITY_PRESET` says

Just my .02


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