[libcxx-commits] [libcxx] f97ea0d - [libcxx] [test] Define _CRT_STDIO_ISO_WIDE_SPECIFIERS while building tests

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 23 06:01:15 PST 2021


Author: Martin Storsjö
Date: 2021-02-23T15:57:30+02:00
New Revision: f97ea0d5b3f5e82a8d96ea57d68c12d22c2eab36

URL: https://github.com/llvm/llvm-project/commit/f97ea0d5b3f5e82a8d96ea57d68c12d22c2eab36
DIFF: https://github.com/llvm/llvm-project/commit/f97ea0d5b3f5e82a8d96ea57d68c12d22c2eab36.diff

LOG: [libcxx] [test] Define _CRT_STDIO_ISO_WIDE_SPECIFIERS while building tests

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

Differential Revision: https://reviews.llvm.org/D97169

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index a10d4392c170..e78303c22b9d 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -272,6 +272,9 @@ def configure_compile_flags(self):
             # 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.


        


More information about the libcxx-commits mailing list