[libcxx] r291091 - Get tests linking on Windows.

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 00:07:18 PST 2017


Author: ericwf
Date: Thu Jan  5 02:07:17 2017
New Revision: 291091

URL: http://llvm.org/viewvc/llvm-project?rev=291091&view=rev
Log:
Get tests linking on Windows.

This patch is a temporary hack to get the tests passing on
Windows.

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

Modified: libcxx/trunk/test/libcxx/test/config.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/config.py?rev=291091&r1=291090&r2=291091&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/config.py (original)
+++ libcxx/trunk/test/libcxx/test/config.py Thu Jan  5 02:07:17 2017
@@ -386,6 +386,9 @@ 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:
+            self.cxx.compile_flags += ['-D_CRT_SECURE_NO_WARNINGS']
 
     def configure_default_compile_flags(self):
         # Try and get the std version from the command line. Fall back to
@@ -572,6 +575,9 @@ class Configuration(object):
             # Configure libraries
             if self.cxx_stdlib_under_test == 'libc++':
                 self.cxx.link_flags += ['-nodefaultlibs']
+                # FIXME: Handle MSVCRT as part of the ABI library handling.
+                if self.is_windows:
+                    self.cxx.link_flags += ['-nostdlib', '-lmsvcrtd']
                 self.configure_link_flags_cxx_library()
                 self.configure_link_flags_abi_library()
                 self.configure_extra_library_flags()




More information about the cfe-commits mailing list