aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Dionne <ldionne.2@gmail.com>2021-04-21 17:56:58 -0400
committerLouis Dionne <ldionne.2@gmail.com>2021-04-21 17:57:16 -0400
commit3d8f2059b95d3e9d6785255949283b258d7ca121 (patch)
treee9506c460e4b6564368a61f66cdebd11b5d253c8
parent[RISCV] Cleanup up the spec version references around fmaxnum/fminnum. (diff)
downloadllvm-project-3d8f2059b95d3e9d6785255949283b258d7ca121.tar.gz
llvm-project-3d8f2059b95d3e9d6785255949283b258d7ca121.tar.bz2
llvm-project-3d8f2059b95d3e9d6785255949283b258d7ca121.zip
[libc++] Move the debug_level feature to the DSL
-rw-r--r--libcxx/utils/libcxx/test/config.py10
-rw-r--r--libcxx/utils/libcxx/test/params.py7
2 files changed, 7 insertions, 10 deletions
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 3c0cb096c6b2..54e67ec7f4d9 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -130,7 +130,6 @@ class Configuration(object):
self.configure_compile_flags()
self.configure_link_flags()
self.configure_env()
- self.configure_debug_mode()
self.configure_sanitizer()
self.configure_coverage()
self.configure_modules()
@@ -473,15 +472,6 @@ class Configuration(object):
self.cxx.link_flags += ['-lc++external_threads']
self.target_info.add_cxx_link_flags(self.cxx.link_flags)
- def configure_debug_mode(self):
- debug_level = self.get_lit_conf('debug_level', None)
- if not debug_level:
- return
- if debug_level not in ['0', '1']:
- self.lit_config.fatal('Invalid value for debug_level "%s".'
- % debug_level)
- self.cxx.compile_flags += ['-D_LIBCPP_DEBUG=%s' % debug_level]
-
def configure_sanitizer(self):
san = self.get_lit_conf('use_sanitizer', '').strip()
if san:
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index c6b47972a35a..9d1d83a7b9c7 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -99,6 +99,13 @@ DEFAULT_PARAMETERS = [
AddCompileFlag('-D_LIBCPP_DISABLE_AVAILABILITY')
]),
+ Parameter(name='debug_level', choices=['', '0', '1'], type=str, default='',
+ help="The debugging level to enable in the test suite.",
+ actions=lambda debugLevel: [] if debugLevel is '' else [
+ AddFeature('debug_level={}'.format(debugLevel)),
+ AddCompileFlag('-D_LIBCPP_DEBUG={}'.format(debugLevel))
+ ]),
+
# Parameters to enable or disable parts of the test suite
Parameter(name='enable_experimental', choices=[True, False], type=bool, default=False,
help="Whether to enable tests for experimental C++ libraries (typically Library Fundamentals TSes).",