From a99bc1563be76bb4f7cd58c290e0a6f08d98d269 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 31 May 2017 23:27:25 +0000 Subject: [PATCH] Define -DNOMINMAX when running the tests on Windows git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304372 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/libcxx/test/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py index 1bf2677a8..0fbc2cf4e 100644 --- a/utils/libcxx/test/config.py +++ b/utils/libcxx/test/config.py @@ -484,9 +484,13 @@ class Configuration(object): # Configure extra flags compile_flags_str = self.get_lit_conf('compile_flags', '') self.cxx.compile_flags += shlex.split(compile_flags_str) - # FIXME: Can we remove this? if self.is_windows: + # FIXME: Can we remove this? self.cxx.compile_flags += ['-D_CRT_SECURE_NO_WARNINGS'] + # 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. + self.cxx.compile_flags += ['-DNOMINMAX'] def configure_default_compile_flags(self): # Try and get the std version from the command line. Fall back to