[libcxx] r304372 - Define -DNOMINMAX when running the tests on Windows

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Wed May 31 16:27:25 PDT 2017


Author: ericwf
Date: Wed May 31 18:27:25 2017
New Revision: 304372

URL: http://llvm.org/viewvc/llvm-project?rev=304372&view=rev
Log:
Define -DNOMINMAX when running the tests on Windows

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

Modified: libcxx/trunk/utils/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/config.py?rev=304372&r1=304371&r2=304372&view=diff
==============================================================================
--- libcxx/trunk/utils/libcxx/test/config.py (original)
+++ libcxx/trunk/utils/libcxx/test/config.py Wed May 31 18:27:25 2017
@@ -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




More information about the cfe-commits mailing list