[libunwind] df6d2e8 - [libunwind] Add -Wno-dll-attribute-on-redeclaration when building for windows
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 26 14:23:43 PDT 2020
Author: Martin Storsjö
Date: 2020-10-26T23:23:01+02:00
New Revision: df6d2e8ab1a4212284e4763724a2211df2c7394a
URL: https://github.com/llvm/llvm-project/commit/df6d2e8ab1a4212284e4763724a2211df2c7394a
DIFF: https://github.com/llvm/llvm-project/commit/df6d2e8ab1a4212284e4763724a2211df2c7394a.diff
LOG: [libunwind] Add -Wno-dll-attribute-on-redeclaration when building for windows
It's not worth trying to fix these warnings within libunwind, instead
silence them.
Differential Revision: https://reviews.llvm.org/D90075
Added:
Modified:
libunwind/CMakeLists.txt
Removed:
################################################################################
diff --git a/libunwind/CMakeLists.txt b/libunwind/CMakeLists.txt
index 1c053e6e8b2a..d7e13b78a9c9 100644
--- a/libunwind/CMakeLists.txt
+++ b/libunwind/CMakeLists.txt
@@ -203,6 +203,14 @@ add_compile_flags_if_supported(-Wundef)
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)
More information about the cfe-commits
mailing list