diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -336,7 +336,8 @@ support_path = os.path.join(self.libcxx_src_root, 'test', 'support') self.configure_config_site_header() if self.cxx_stdlib_under_test != 'libstdc++' and \ - not self.target_info.is_windows(): + not self.target_info.is_windows() and \ + not self.target_info.is_zos(): self.cxx.compile_flags += [ '-include', os.path.join(support_path, 'nasty_macros.h')] if self.cxx_stdlib_under_test == 'msvc': diff --git a/libcxx/utils/libcxx/test/target_info.py b/libcxx/utils/libcxx/test/target_info.py --- a/libcxx/utils/libcxx/test/target_info.py +++ b/libcxx/utils/libcxx/test/target_info.py @@ -27,6 +27,9 @@ def is_windows(self): return False + def is_zos(self): + return False + def is_mingw(self): return False @@ -193,6 +196,13 @@ def is_windows(self): return True +class ZOSLocalTI(DefaultTargetInfo): + def __init__(self, full_config): + super(ZOSLocalTI, self).__init__(full_config) + + def is_zos(self): + return True + class MingwLocalTI(WindowsLocalTI): def __init__(self, full_config): super(MingwLocalTI, self).__init__(full_config) @@ -215,4 +225,5 @@ if target_system == 'NetBSD': return NetBSDLocalTI(full_config) if target_system == 'Linux': return LinuxLocalTI(full_config) if target_system == 'Windows': return WindowsLocalTI(full_config) + if target_system == 'OS/390': return ZOSLocalTI(full_config) return DefaultTargetInfo(full_config)