[libcxx-commits] [PATCH] D97294: [libcxx] [test] Add a MinGW target
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 25 14:11:39 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb2e4f5401d3: [libcxx] [test] Add a MinGW target (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97294/new/
https://reviews.llvm.org/D97294
Files:
libcxx/utils/libcxx/test/config.py
libcxx/utils/libcxx/test/target_info.py
Index: libcxx/utils/libcxx/test/target_info.py
===================================================================
--- libcxx/utils/libcxx/test/target_info.py
+++ libcxx/utils/libcxx/test/target_info.py
@@ -27,6 +27,9 @@
def is_windows(self):
return self.platform() == 'win32'
+ def is_mingw(self):
+ return False
+
def is_darwin(self):
return self.platform() == 'darwin'
@@ -184,6 +187,13 @@
def __init__(self, full_config):
super(WindowsLocalTI, self).__init__(full_config)
+class MingwLocalTI(WindowsLocalTI):
+ def __init__(self, full_config):
+ super(MingwLocalTI, self).__init__(full_config)
+
+ def is_mingw(self):
+ return True
+
def make_target_info(full_config):
default = "libcxx.test.target_info.LocalTI"
info_str = full_config.get_lit_conf('target_info', default)
Index: libcxx/utils/libcxx/test/config.py
===================================================================
--- libcxx/utils/libcxx/test/config.py
+++ libcxx/utils/libcxx/test/config.py
@@ -109,7 +109,7 @@
def make_static_lib_name(self, name):
"""Return the full filename for the specified library name"""
- if self.target_info.is_windows():
+ if self.target_info.is_windows() and not self.target_info.is_mingw():
assert name == 'c++' # Only allow libc++ to use this function for now.
return 'lib' + name + '.lib'
else:
@@ -382,9 +382,12 @@
# Configure libraries
if self.cxx_stdlib_under_test == 'libc++':
- self.cxx.link_flags += ['-nodefaultlibs']
+ if self.target_info.is_mingw():
+ self.cxx.link_flags += ['-nostdlib++']
+ else:
+ self.cxx.link_flags += ['-nodefaultlibs']
# FIXME: Handle MSVCRT as part of the ABI library handling.
- if self.target_info.is_windows():
+ if self.target_info.is_windows() and not self.target_info.is_mingw():
self.cxx.link_flags += ['-nostdlib']
self.configure_link_flags_cxx_library()
self.configure_link_flags_abi_library()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97294.326499.patch
Type: text/x-patch
Size: 2157 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210225/aded05c1/attachment.bin>
More information about the libcxx-commits
mailing list