From: Eric Fiselier Date: Mon, 15 Aug 2016 19:37:20 +0000 (+0000) Subject: Use -O1 when testing with ASAN and MSAN to prevent Clang OOM errors. X-Git-Tag: llvmorg-4.0.0-rc1~12409 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9ce2917390f3b9c28a6ee57536193cdf47d4db9;p=platform%2Fupstream%2Fllvm.git Use -O1 when testing with ASAN and MSAN to prevent Clang OOM errors. Currently certain tests get killed when compiled with ASAN at -O0 because they eat all of the systems memory. This doesn't happen at -O1, so enable that to work around the issue. llvm-svn: 278722 --- diff --git a/libcxx/test/libcxx/test/config.py b/libcxx/test/libcxx/test/config.py index 1d03155..579089a 100644 --- a/libcxx/test/libcxx/test/config.py +++ b/libcxx/test/libcxx/test/config.py @@ -617,6 +617,7 @@ class Configuration(object): self.env['ASAN_OPTIONS'] = 'detect_odr_violation=0' self.config.available_features.add('asan') self.config.available_features.add('sanitizer-new-delete') + self.cxx.compile_flags += ['-O1'] elif san == 'Memory' or san == 'MemoryWithOrigins': self.cxx.flags += ['-fsanitize=memory'] if san == 'MemoryWithOrigins': @@ -626,6 +627,7 @@ class Configuration(object): self.env['MSAN_SYMBOLIZER_PATH'] = llvm_symbolizer self.config.available_features.add('msan') self.config.available_features.add('sanitizer-new-delete') + self.cxx.compile_flags += ['-O1'] elif san == 'Undefined': self.cxx.flags += ['-fsanitize=undefined', '-fno-sanitize=vptr,function,float-divide-by-zero',