diff options
author | Henrik Edin <henrik.edin@mongodb.com> | 2019-02-12 14:38:02 -0500 |
---|---|---|
committer | Henrik Edin <henrik.edin@mongodb.com> | 2019-02-25 10:04:33 -0500 |
commit | a133891a93a7d311f4c1d542f86622739dcc183a (patch) | |
tree | f320c7cca2ea2ab56df1dd96ddf81f3f7e6d2924 /SConstruct | |
parent | 418206426d4de5071e69b5e3588b31e26a0445d3 (diff) | |
download | mongo-a133891a93a7d311f4c1d542f86622739dcc183a.tar.gz |
SERVER-26300 Allow tcmalloc to be used with TSAN and UBSAN.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct index fcb305a6708..a0fc3b2882f 100644 --- a/SConstruct +++ b/SConstruct @@ -2590,11 +2590,6 @@ def doConfigure(myenv): # GCC's implementation of ASAN depends on libdl. env.Append(LIBS=['dl']) - if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental']: - # There are multiply defined symbols between the sanitizer and - # our vendorized tcmalloc. - env.FatalError("Cannot use --sanitize with tcmalloc") - sanitizer_list = get_option('sanitize').split(',') using_lsan = 'leak' in sanitizer_list @@ -2602,6 +2597,11 @@ def doConfigure(myenv): using_tsan = 'thread' in sanitizer_list using_ubsan = 'undefined' in sanitizer_list + if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental'] and (using_lsan or using_asan): + # There are multiply defined symbols between the sanitizer and + # our vendorized tcmalloc. + env.FatalError("Cannot use --sanitize=leak or --sanitize=address with tcmalloc") + # If the user asked for leak sanitizer, turn on the detect_leaks # ASAN_OPTION. If they asked for address sanitizer as well, drop # 'leak', because -fsanitize=leak means no address. |