Enable testing with _LIBCPP_DEBUG and fix bad assertions in string_view.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229698 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -91,6 +91,7 @@ class Configuration(object):
|
||||
self.configure_env()
|
||||
self.configure_compile_flags()
|
||||
self.configure_link_flags()
|
||||
self.configure_debug_mode()
|
||||
self.configure_warnings()
|
||||
self.configure_sanitizer()
|
||||
self.configure_substitutions()
|
||||
@@ -468,6 +469,15 @@ class Configuration(object):
|
||||
else:
|
||||
self.lit_config.fatal("unrecognized system: %r" % target_platform)
|
||||
|
||||
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_warnings(self):
|
||||
enable_warnings = self.get_lit_bool('enable_warnings', False)
|
||||
if enable_warnings:
|
||||
|
Reference in New Issue
Block a user