[PATCH] D40483: [libunwind] Support building libunwind as a DLL

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 21:52:11 PST 2017


mstorsjo added inline comments.


================
Comment at: src/config.h:53
 #else
-  // FIXME: these macros are not correct for COFF targets
-  #define _LIBUNWIND_EXPORT __attribute__((visibility("default")))
-  #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden")))
+  #if defined(_WIN32)
+    #define _LIBUNWIND_EXPORT __declspec(dllexport)
----------------
compnerd wrote:
> I think that `!defined(__ELF__) && !defined(__MACHO__)` is better than `defined(_WIN32)`, as these are PE/COFF specific, not Windows specification.
Ok, I can make it use that instead. libcxx and libcxxabi do use `defined(_WIN32)` in their similar checks though.


https://reviews.llvm.org/D40483





More information about the llvm-commits mailing list