[PATCH] D74564: libclang: Add static build support for Windows

Cristian Adam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 17 05:21:42 PST 2020


cristian.adam added inline comments.


================
Comment at: clang/include/clang-c/Platform.h:31
+#elif defined(CINDEX_EXPORTS)
+  #define CINDEX_LINKAGE __attribute__((visibility("default")))
+#endif
----------------
yvvan wrote:
> Is it different from just leaving CINDEX_LINKAGE empty?
On Windows the default symbol visibility is hidden and with CINDEX_LINKAGE we make the symbols visible.

On Linux it's the other way around, everything is visible, but 
with CMAKE_CXX_VISIBILITY_PRESET=hidden we will have the Windows behavior and then we need to make CINDEX_LINKAGE point to something that will make the symbols visible.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74564





More information about the cfe-commits mailing list