[libcxx] Add support for LLVM_USE_SANITIZER=Undefined

LLVM_USE_SANITIZER=Undefined support was added to the LLVM CMake configuration.
Update libc++'s handling of LLVM_USE_SANITIZER to support this as well.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@219987 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2014-10-16 23:21:59 +00:00
parent 798b2ac28f
commit 66d529f0ad
2 changed files with 8 additions and 0 deletions

View File

@@ -434,6 +434,11 @@ class Configuration(object):
if san == 'MemoryWithOrigins':
self.compile_flags += ['-fsanitize-memory-track-origins']
self.config.available_features.add('msan')
elif san == 'Undefined':
self.compile_flags += ['-fsanitize=undefined',
'-fno-sanitize=vptr,function',
'-fno-sanitize-recover']
self.config.available_features.add('ubsan')
else:
self.lit_config.fatal('unsupported value for '
'libcxx_use_san: {0}'.format(san))