[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

GitOrigin-RevId: 4d478121f3bfd16129d8fd9de0e05ab9316329a6
diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py
index 57b729b..3262c37 100644
--- a/utils/libcxx/test/config.py
+++ b/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/utils/libcxx/test/target_info.py b/utils/libcxx/test/target_info.py
index b128ab0..198d2ee 100644
--- a/utils/libcxx/test/target_info.py
+++ b/utils/libcxx/test/target_info.py
@@ -24,6 +24,9 @@
     def is_windows(self):
         return False
 
+    def is_zos(self):
+        return False
+
     def is_mingw(self):
         return False
 
@@ -135,6 +138,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)
@@ -157,4 +167,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)