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

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 28 21:27:47 PST 2017


compnerd accepted this revision.
compnerd added a comment.
This revision is now accepted and ready to land.

LG with the adjustment for the dll storage macros.



================
Comment at: CMakeLists.txt:313
+  add_definitions(-D_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS)
+endif()
+
----------------
Ugh, I really do dislike the `_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS` macro, but that isn't your fault.


================
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)
----------------
I think that `!defined(__ELF__) && !defined(__MACHO__)` is better than `defined(_WIN32)`, as these are PE/COFF specific, not Windows specification.


https://reviews.llvm.org/D40483





More information about the llvm-commits mailing list