summaryrefslogtreecommitdiff
path: root/utils/libcxx/test/config.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils/libcxx/test/config.py')
-rw-r--r--utils/libcxx/test/config.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/utils/libcxx/test/config.py b/utils/libcxx/test/config.py
index 7f1ae851b9ce..25553c70da31 100644
--- a/utils/libcxx/test/config.py
+++ b/utils/libcxx/test/config.py
@@ -67,7 +67,7 @@ class Configuration(object):
self.abi_library_root = None
self.link_shared = self.get_lit_bool('enable_shared', default=True)
self.debug_build = self.get_lit_bool('debug_build', default=False)
- self.exec_env = {}
+ self.exec_env = dict(os.environ)
self.use_target = False
self.use_system_cxx_lib = False
self.use_clang_verify = False
@@ -160,7 +160,11 @@ class Configuration(object):
# Print as list to prevent "set([...])" from being printed.
self.lit_config.note('Using available_features: %s' %
list(self.config.available_features))
- self.lit_config.note('Using environment: %r' % self.exec_env)
+ show_env_vars = {}
+ for k,v in self.exec_env.items():
+ if k not in os.environ or os.environ[k] != v:
+ show_env_vars[k] = v
+ self.lit_config.note('Adding environment variables: %r' % show_env_vars)
sys.stderr.flush() # Force flushing to avoid broken output on Windows
def get_test_format(self):
@@ -546,6 +550,7 @@ class Configuration(object):
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.is_windows:
self.cxx.compile_flags += [
@@ -561,7 +566,6 @@ class Configuration(object):
'-include', os.path.join(support_path,
'set_windows_crt_report_mode.h')
]
- self.configure_config_site_header()
cxx_headers = self.get_lit_conf('cxx_headers')
if cxx_headers == '' or (cxx_headers is None
and self.cxx_stdlib_under_test != 'libc++'):
@@ -868,6 +872,9 @@ class Configuration(object):
# FIXME: Enable the two warnings below.
self.cxx.addWarningFlagIfSupported('-Wno-conversion')
self.cxx.addWarningFlagIfSupported('-Wno-unused-local-typedef')
+ # FIXME: Remove this warning once the min/max handling patch lands
+ # See https://reviews.llvm.org/D33080
+ self.cxx.addWarningFlagIfSupported('-Wno-#warnings')
std = self.get_lit_conf('std', None)
if std in ['c++98', 'c++03']:
# The '#define static_assert' provided by libc++ in C++03 mode
@@ -1002,18 +1009,8 @@ class Configuration(object):
sub.append(('%link', link_str))
sub.append(('%build', build_str))
# Configure exec prefix substitutions.
- exec_env_str = ''
- if not self.is_windows and len(self.exec_env) != 0:
- exec_env_str = 'env '
- for k, v in self.exec_env.items():
- exec_env_str += ' %s=%s' % (k, v)
# Configure run env substitution.
- exec_str = exec_env_str
- if self.lit_config.useValgrind:
- exec_str = ' '.join(self.lit_config.valgrindArgs) + exec_env_str
- sub.append(('%exec', exec_str))
- # Configure run shortcut
- sub.append(('%run', exec_str + ' %t.exe'))
+ sub.append(('%run', '%t.exe'))
# Configure not program substitutions
not_py = os.path.join(self.libcxx_src_root, 'utils', 'not.py')
not_str = '%s %s ' % (pipes.quote(sys.executable), pipes.quote(not_py))