[libcxx-commits] [PATCH] D90075: [libunwind] Add -Wno-dll-attribute-on-redeclaration when building for windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 26 14:23:43 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGdf6d2e8ab1a4: [libunwind] Add -Wno-dll-attribute-on-redeclaration when building for windows (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90075

Files:
  libunwind/CMakeLists.txt


Index: libunwind/CMakeLists.txt
===================================================================
--- libunwind/CMakeLists.txt
+++ libunwind/CMakeLists.txt
@@ -203,6 +203,14 @@
 
 add_compile_flags_if_supported(-Wno-suggest-override)
 
+if (WIN32)
+  # The headers lack matching dllexport attributes (_LIBUNWIND_EXPORT);
+  # silence the warning instead of cluttering the headers (which aren't
+  # necessarily the ones that the callers will use anyway) with the
+  # attributes.
+  add_compile_flags_if_supported(-Wno-dll-attribute-on-redeclaration)
+endif()
+
 if (LIBUNWIND_ENABLE_WERROR)
   add_compile_flags_if_supported(-Werror)
   add_compile_flags_if_supported(-WX)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90075.300789.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201026/c6b6916b/attachment-0001.bin>


More information about the libcxx-commits mailing list