diff options
author | Kuba Brecka <kuba.brecka@gmail.com> | 2015-07-20 15:03:39 +0000 |
---|---|---|
committer | Kuba Brecka <kuba.brecka@gmail.com> | 2015-07-20 15:03:39 +0000 |
commit | 25b2f754b57a376b958e9b13f82c114e4d3c5b00 (patch) | |
tree | 798107434ea02cabe71528aea5e9101898e06d45 /compiler-rt/lib/asan/tests/asan_test_main.cc | |
parent | 836f2e86e5dff1fe934098ea3b377db922925034 (diff) | |
download | bcm5719-llvm-25b2f754b57a376b958e9b13f82c114e4d3c5b00.tar.gz bcm5719-llvm-25b2f754b57a376b958e9b13f82c114e4d3c5b00.zip |
[asan] Speed up ASan unit tests by turning off symbolication
ASan unit tests don't depend on the symbolizer and they never test its output, but currently they still run it for every crash. This patch simply disables the symbolizer for unit tests, which provides some speed up. On my system (OS X) that's about 1.4x faster, but this could be potentially much more e.g. when using atos on OS X.
Differential Revision: http://reviews.llvm.org/D11353
llvm-svn: 242677
Diffstat (limited to 'compiler-rt/lib/asan/tests/asan_test_main.cc')
-rw-r--r-- | compiler-rt/lib/asan/tests/asan_test_main.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/tests/asan_test_main.cc b/compiler-rt/lib/asan/tests/asan_test_main.cc index 1746c5f4837..53df3e716a8 100644 --- a/compiler-rt/lib/asan/tests/asan_test_main.cc +++ b/compiler-rt/lib/asan/tests/asan_test_main.cc @@ -12,6 +12,12 @@ //===----------------------------------------------------------------------===// #include "asan_test_utils.h" +// Default ASAN_OPTIONS for the unit tests. Let's turn symbolication off to +// speed up testing (unit tests don't use it anyway). +extern "C" const char* __asan_default_options() { + return "symbolize=false"; +} + int main(int argc, char **argv) { testing::GTEST_FLAG(death_test_style) = "threadsafe"; testing::InitGoogleTest(&argc, argv); |