Get tests running with warnings. Fix warnings in headers and tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -92,6 +92,7 @@ class Configuration(object):
|
||||
self.configure_env()
|
||||
self.configure_compile_flags()
|
||||
self.configure_link_flags()
|
||||
self.configure_warnings()
|
||||
self.configure_sanitizer()
|
||||
self.configure_substitutions()
|
||||
self.configure_features()
|
||||
@@ -456,6 +457,14 @@ class Configuration(object):
|
||||
else:
|
||||
self.lit_config.fatal("unrecognized system: %r" % sys.platform)
|
||||
|
||||
def configure_warnings(self):
|
||||
enable_warnings = self.get_lit_bool('enable_warnings', False)
|
||||
if enable_warnings:
|
||||
self.cxx.compile_flags += ['-Wsystem-headers', '-Wall', '-Werror']
|
||||
if ('clang' in self.config.available_features or
|
||||
'apple-clang' in self.config.available_features):
|
||||
self.cxx.compile_flags += ['-Wno-user-defined-literals']
|
||||
|
||||
def configure_sanitizer(self):
|
||||
san = self.get_lit_conf('use_sanitizer', '').strip()
|
||||
if san:
|
||||
|
Reference in New Issue
Block a user