[libcxx-commits] [PATCH] D97168: [libcxx] [test] Add -Wno-dllimport-static-field-def when building tests

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Feb 21 15:35:23 PST 2021

mstorsjo created this revision.
mstorsjo added reviewers: libc++, CaseyCarter, STL_MSFT, miscco, EricWF.
Herald added a subscriber: arichardson.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.

This fixes building tests with a dynamically linked libcxx, where most tests previously errored out with errors like:

  libcxx/include/string:4409:59: error: definition of dllimport static field [-Werror,-Wdllimport-static-field-def]
                 basic_string<_CharT, _Traits, _Allocator>::npos;

(These errors show up when building tests since 2d8f23f571635c1fb983b40c4c2548716a5b65b6 <https://reviews.llvm.org/rG2d8f23f571635c1fb983b40c4c2548716a5b65b6> and 59919c4d6b6370da7133bbca0d31844e21646bb1 <https://reviews.llvm.org/rG59919c4d6b6370da7133bbca0d31844e21646bb1>.)

  rG LLVM Github Monorepo



Index: libcxx/utils/libcxx/test/params.py
--- libcxx/utils/libcxx/test/params.py
+++ libcxx/utils/libcxx/test/params.py
@@ -22,6 +22,7 @@
+  '-Wno-dllimport-static-field-def',
   # GCC warns about places where we might want to add sized allocation/deallocation
   # functions, but we know better what we're doing/testing in the test suite.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97168.325348.patch
Type: text/x-patch
Size: 505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210221/70137920/attachment-0001.bin>

More information about the libcxx-commits mailing list