[libcxx-commits] [PATCH] D97169: [libcxx] [test] Define _CRT_STDIO_ISO_WIDE_SPECIFIERS while building tests

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


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

This matches how libc++ itself is built. This avoids errors due to mismatch if linking libc++ statically.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D97169

Files:
  libcxx/utils/libcxx/test/config.py


Index: libcxx/utils/libcxx/test/config.py
===================================================================
--- libcxx/utils/libcxx/test/config.py
+++ libcxx/utils/libcxx/test/config.py
@@ -272,6 +272,9 @@
             # Don't warn about using common but nonstandard unprefixed functions
             # like chdir, fileno.
             self.cxx.compile_flags += ['-D_CRT_NONSTDC_NO_WARNINGS']
+            # Build the tests in the same configuration as libcxx itself,
+            # to avoid mismatches if linked statically.
+            self.cxx.compile_flags += ['-D_CRT_STDIO_ISO_WIDE_SPECIFIERS']
             # Required so that tests using min/max don't fail on Windows,
             # and so that those tests don't have to be changed to tolerate
             # this insanity.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97169.325351.patch
Type: text/x-patch
Size: 784 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210221/674fab95/attachment.bin>


More information about the libcxx-commits mailing list