diff options
| author | Alexey Samsonov <vonosmas@gmail.com> | 2014-09-05 22:05:32 +0000 |
|---|---|---|
| committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-09-05 22:05:32 +0000 |
| commit | 62063b46fcbe811726432dd897e9b7f46f84eb44 (patch) | |
| tree | bf0346aef95a04e1c36d287096d9c32124bfdb42 | |
| parent | c82f650a2b64a14cef9a68295b010c1578694099 (diff) | |
| download | bcm5719-llvm-62063b46fcbe811726432dd897e9b7f46f84eb44.tar.gz bcm5719-llvm-62063b46fcbe811726432dd897e9b7f46f84eb44.zip | |
Use "-gline-tables-only" instead of "-g" in sanitizer test suites.
We are interested in verifying that -gline-tables-only provides enough
debug information for verbose error reports and symbolized stack traces.
llvm-svn: 217284
| -rw-r--r-- | compiler-rt/test/asan/lit.cfg | 6 | ||||
| -rw-r--r-- | compiler-rt/test/lit.common.cfg | 4 | ||||
| -rw-r--r-- | compiler-rt/test/lsan/lit.common.cfg | 2 | ||||
| -rw-r--r-- | compiler-rt/test/msan/lit.cfg | 3 | ||||
| -rw-r--r-- | compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc | 2 | ||||
| -rw-r--r-- | compiler-rt/test/sanitizer_common/lit.common.cfg | 2 | ||||
| -rw-r--r-- | compiler-rt/test/tsan/lit.cfg | 4 |
7 files changed, 12 insertions, 11 deletions
diff --git a/compiler-rt/test/asan/lit.cfg b/compiler-rt/test/asan/lit.cfg index 0bcc311ca5d..5dded58a717 100644 --- a/compiler-rt/test/asan/lit.cfg +++ b/compiler-rt/test/asan/lit.cfg @@ -38,11 +38,11 @@ if config.compiler_id == 'GNU' and config.host_os != 'FreeBSD': # FIXME: Review the set of required flags and check if it can be reduced. target_cflags = [get_required_attr(config, "target_cflags")] + extra_linkflags target_cxxflags = config.cxx_mode_flags + target_cflags -clang_asan_static_cflags = ["-fsanitize=address", +clang_asan_static_cflags = (["-fsanitize=address", "-mno-omit-leaf-frame-pointer", "-fno-omit-frame-pointer", - "-fno-optimize-sibling-calls", - "-g"] + target_cflags + "-fno-optimize-sibling-calls"] + + config.debug_info_flags + target_cflags) clang_asan_static_cxxflags = config.cxx_mode_flags + clang_asan_static_cflags if config.asan_dynamic: diff --git a/compiler-rt/test/lit.common.cfg b/compiler-rt/test/lit.common.cfg index 1613c3b8e03..0ee2b84481d 100644 --- a/compiler-rt/test/lit.common.cfg +++ b/compiler-rt/test/lit.common.cfg @@ -25,8 +25,12 @@ if compiler_id == "Clang": config.cxx_mode_flags = ["--driver-mode=g++"] else: config.cxx_mode_flags = [] + # We assume that sanitizers should provide good enough error + # reports and stack traces even with minimal debug info. + config.debug_info_flags = ["-gline-tables-only"] elif compiler_id == 'GNU': config.cxx_mode_flags = ["-x c++"] + config.debug_info_flags = ["-g"] else: lit_config.fatal("Unsupported compiler id: %r" % compiler_id) # Add compiler ID to the list of available features. diff --git a/compiler-rt/test/lsan/lit.common.cfg b/compiler-rt/test/lsan/lit.common.cfg index 7411d7a9816..e11c90a6f9f 100644 --- a/compiler-rt/test/lsan/lit.common.cfg +++ b/compiler-rt/test/lsan/lit.common.cfg @@ -29,7 +29,7 @@ elif lsan_lit_test_mode == "AddressSanitizer": else: lit_config.fatal("Unknown LSan test mode: %r" % lsan_lit_test_mode) -clang_cflags = ["-g", "-O0", "-m64"] +clang_cflags = ["-O0", "-m64"] + config.debug_info_flags clang_cxxflags = config.cxx_mode_flags + clang_cflags clang_lsan_cflags = clang_cflags + lsan_cflags clang_lsan_cxxflags = clang_cxxflags + lsan_cflags diff --git a/compiler-rt/test/msan/lit.cfg b/compiler-rt/test/msan/lit.cfg index 31436083f98..f425e25957a 100644 --- a/compiler-rt/test/msan/lit.cfg +++ b/compiler-rt/test/msan/lit.cfg @@ -13,8 +13,7 @@ clang_msan_cflags = ["-fsanitize=memory", "-mno-omit-leaf-frame-pointer", "-fno-omit-frame-pointer", "-fno-optimize-sibling-calls", - "-g", - "-m64"] + "-m64"] + config.debug_info_flags clang_msan_cxxflags = config.cxx_mode_flags + clang_msan_cflags def build_invocation(compile_flags): diff --git a/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc b/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc index 98d9ddf5d66..d675c757475 100644 --- a/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc +++ b/compiler-rt/test/sanitizer_common/TestCases/print-stack-trace.cc @@ -16,5 +16,5 @@ int main() { return 0; } // CHECK: {{ #0 0x.* in __sanitizer_print_stack_trace}} -// CHECK: {{ #1 0x.* in FooBarBaz\(\) .*print-stack-trace.cc:11}} +// CHECK: {{ #1 0x.* in FooBarBaz(\(\))? .*print-stack-trace.cc:11}} // CHECK: {{ #2 0x.* in main.*print-stack-trace.cc:15}} diff --git a/compiler-rt/test/sanitizer_common/lit.common.cfg b/compiler-rt/test/sanitizer_common/lit.common.cfg index 6e768b1b5ce..6a3ce2a6dc9 100644 --- a/compiler-rt/test/sanitizer_common/lit.common.cfg +++ b/compiler-rt/test/sanitizer_common/lit.common.cfg @@ -18,7 +18,7 @@ else: config.available_features.add(config.tool_name) -clang_cflags = ["-g"] + tool_cflags + [config.target_cflags] +clang_cflags = config.debug_info_flags + tool_cflags + [config.target_cflags] clang_cxxflags = config.cxx_mode_flags + clang_cflags def build_invocation(compile_flags): diff --git a/compiler-rt/test/tsan/lit.cfg b/compiler-rt/test/tsan/lit.cfg index f7051b3b698..d8b4fe9ff4a 100644 --- a/compiler-rt/test/tsan/lit.cfg +++ b/compiler-rt/test/tsan/lit.cfg @@ -29,11 +29,9 @@ else: extra_cflags = [] # Setup default compiler flags used with -fsanitize=thread option. -# FIXME: Review the set of required flags and check if it can be reduced. clang_tsan_cflags = ["-fsanitize=thread", - "-g", "-Wall", - "-m64"] + extra_cflags + "-m64"] + config.debug_info_flags + extra_cflags clang_tsan_cxxflags = config.cxx_mode_flags + clang_tsan_cflags # Add additional flags if we're using instrumented libc++. if config.has_libcxx: |

