[libcxx-commits] [libcxx] 4d47812 - [SystemZ][z/OS] exclude nasty_macros.h from check-cxx
Zbigniew Sarbinowski via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Mar 26 08:08:47 PDT 2021
Author: Zbigniew Sarbinowski
Date: 2021-03-26T15:08:37Z
New Revision: 4d478121f3bfd16129d8fd9de0e05ab9316329a6
URL: https://github.com/llvm/llvm-project/commit/4d478121f3bfd16129d8fd9de0e05ab9316329a6
DIFF: https://github.com/llvm/llvm-project/commit/4d478121f3bfd16129d8fd9de0e05ab9316329a6.diff
LOG: [SystemZ][z/OS] exclude nasty_macros.h from check-cxx
Need to exclude nasty_macros.h from check-cxx on z/OS due to conflicts within system headers.
Sample failure in `random_shuffle.depr_in_cxx14.verify.cpp` libcxx test.
```
error: 'error' diagnostics seen but not expected:
Line 1268: expected ')'
Line 1268: unknown type name 'This'
Line 1268: expected ')'
```
caused by the following macros in `nasty_macros.h`
```
#define NASTY_MACRO This should not be expanded!!!
#define _E NASTY_MACRO
```
The name collision is observed in the following code snippet whre `_E` is being used as parameter name:
```
inline int iswalnum(wint_t _E) {return __iswalnum(_E);}
```
It is reasonable to exclude `nasty_macros.h` on z/OS similarly as it was done on Windows.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D99378
Added:
Modified:
libcxx/utils/libcxx/test/config.py
libcxx/utils/libcxx/test/target_info.py
Removed:
################################################################################
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 57b729be0612..3262c37f2153 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -336,7 +336,8 @@ def configure_compile_flags_header_includes(self):
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
index b128ab0f7726..198d2eebe979 100644
--- a/libcxx/utils/libcxx/test/target_info.py
+++ b/libcxx/utils/libcxx/test/target_info.py
@@ -24,6 +24,9 @@ def __init__(self, full_config):
def is_windows(self):
return False
+ def is_zos(self):
+ return False
+
def is_mingw(self):
return False
@@ -135,6 +138,13 @@ def __init__(self, full_config):
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)
@@ -157,4 +167,5 @@ def make_target_info(full_config):
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)
More information about the libcxx-commits
mailing list