forked from OSchip/llvm-project
[libcxx] [test] Avoid conflicting definitions of _CRT_SECURE_NO_WARNINGS
This is defined both by libcxx/utils/libcxx/test/config.py (for any windows target) and msvc_stdlib_force_include.h (when testing specifically the MSVC C++ library). The command line define (-D_CRT_SECURE_NO_WARNINGS) defines it to the value 1; change the header define to match that. Keeping both instances, to keep the fix for cases when not building in cases that don't use config.py. Also remove a comment about whether this can be removed; it can't at least be removed altogether - doing that breaks a number of tests that otherwise succeed. Differential Revision: https://reviews.llvm.org/D89588
This commit is contained in:
parent
38b632c16e
commit
b30e42922a
|
@ -14,7 +14,7 @@
|
|||
|
||||
#ifndef _LIBCXX_IN_DEVCRT
|
||||
// Silence warnings about CRT machinery.
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#define _CRT_SECURE_NO_WARNINGS 1
|
||||
|
||||
// Avoid assertion dialogs.
|
||||
#define _CRT_SECURE_INVALID_PARAMETER(EXPR) ::abort()
|
||||
|
|
|
@ -272,7 +272,6 @@ class Configuration(object):
|
|||
compile_flags_str = self.get_lit_conf('compile_flags', '')
|
||||
self.cxx.compile_flags += shlex.split(compile_flags_str)
|
||||
if self.target_info.is_windows():
|
||||
# FIXME: Can we remove this?
|
||||
self.cxx.compile_flags += ['-D_CRT_SECURE_NO_WARNINGS']
|
||||
# Don't warn about using common but nonstandard unprefixed functions
|
||||
# like chdir, fileno.
|
||||
|
|
Loading…
Reference in New Issue