Get tests linking on Windows.
This patch is a temporary hack to get the tests passing on
Windows.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291091 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/libcxx/test/config.py b/test/libcxx/test/config.py
index 40defdf..7043b8a 100644
--- a/test/libcxx/test/config.py
+++ b/test/libcxx/test/config.py
@@ -386,6 +386,9 @@
# 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 @@
# 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()