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.