[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
This commit is contained in:
Martin Storsjö 2020-10-23 22:51:21 +03:00
parent 357715ce97
commit df6d2e8ab1
1 changed files with 8 additions and 0 deletions

View File

@ -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)