[libcxx-commits] [PATCH] D57107: [libunwind] Support building hermetic static library

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 25 00:59:38 PST 2019


phosek marked an inline comment as done.
phosek added inline comments.


================
Comment at: libunwind/src/CMakeLists.txt:134
+      _LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS
+      _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
+    FLAGS ${UNWIND_STATIC_OBJECTS_FLAGS})
----------------
ldionne wrote:
> We need to define this when building libunwind? This circular dependency looks like a smell.
Unfortunately yes because libunwind uses `operator new` (https://github.com/llvm/llvm-project/blob/master/libunwind/src/libunwind.cpp#L125) which definition comes from libc++ and without this define, we get a conflicting declaration error (the implicit declaration provided by the compiler has hidden visibility due to `-fvisibility-global-new-delete-hidden` but that one that comes from libc++ has default visibility).


Repository:
  rUNW libunwind

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

https://reviews.llvm.org/D57107





More information about the libcxx-commits mailing list