[compiler-rt] r217284 - Use "-gline-tables-only" instead of "-g" in sanitizer test suites.

Eric Christopher echristo at gmail.com
Fri Sep 5 15:49:43 PDT 2014


On Fri, Sep 5, 2014 at 3:48 PM, David Blaikie <dblaikie at gmail.com> wrote:

>
>
>
> On Fri, Sep 5, 2014 at 3:26 PM, Eric Christopher <echristo at gmail.com>
> wrote:
>
>> ... I know you'll kick me for this, but we should add an alias for -gmlt
>> to -gline-tables-only. :)
>>
>
> Pretty sure I already did... probably.
>
> http://llvm.org/viewvc/llvm-project?rev=203603&view=rev
>

Awesome. :)

-eric


>
>
>
>>
>> -eric
>>
>>
>> On Fri, Sep 5, 2014 at 3:05 PM, Alexey Samsonov <vonosmas at gmail.com>
>> wrote:
>>
>>> Author: samsonov
>>> Date: Fri Sep  5 17:05:32 2014
>>> New Revision: 217284
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=217284&view=rev
>>> Log:
>>> 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.
>>>
>>> Modified:
>>>     compiler-rt/trunk/test/asan/lit.cfg
>>>     compiler-rt/trunk/test/lit.common.cfg
>>>     compiler-rt/trunk/test/lsan/lit.common.cfg
>>>     compiler-rt/trunk/test/msan/lit.cfg
>>>
>>> compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
>>>     compiler-rt/trunk/test/sanitizer_common/lit.common.cfg
>>>     compiler-rt/trunk/test/tsan/lit.cfg
>>>
>>> Modified: compiler-rt/trunk/test/asan/lit.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=217284&r1=217283&r2=217284&view=diff
>>>
>>> ==============================================================================
>>> --- compiler-rt/trunk/test/asan/lit.cfg (original)
>>> +++ compiler-rt/trunk/test/asan/lit.cfg Fri Sep  5 17:05:32 2014
>>> @@ -38,11 +38,11 @@ if config.compiler_id == 'GNU' and confi
>>>  # 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:
>>>
>>> Modified: compiler-rt/trunk/test/lit.common.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=217284&r1=217283&r2=217284&view=diff
>>>
>>> ==============================================================================
>>> --- compiler-rt/trunk/test/lit.common.cfg (original)
>>> +++ compiler-rt/trunk/test/lit.common.cfg Fri Sep  5 17:05:32 2014
>>> @@ -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.
>>>
>>> Modified: compiler-rt/trunk/test/lsan/lit.common.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/lit.common.cfg?rev=217284&r1=217283&r2=217284&view=diff
>>>
>>> ==============================================================================
>>> --- compiler-rt/trunk/test/lsan/lit.common.cfg (original)
>>> +++ compiler-rt/trunk/test/lsan/lit.common.cfg Fri Sep  5 17:05:32 2014
>>> @@ -29,7 +29,7 @@ elif lsan_lit_test_mode == "AddressSanit
>>>  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
>>>
>>> Modified: compiler-rt/trunk/test/msan/lit.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/lit.cfg?rev=217284&r1=217283&r2=217284&view=diff
>>>
>>> ==============================================================================
>>> --- compiler-rt/trunk/test/msan/lit.cfg (original)
>>> +++ compiler-rt/trunk/test/msan/lit.cfg Fri Sep  5 17:05:32 2014
>>> @@ -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):
>>>
>>> Modified:
>>> compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc?rev=217284&r1=217283&r2=217284&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc
>>> (original)
>>> +++
>>> compiler-rt/trunk/test/sanitizer_common/TestCases/print-stack-trace.cc Fri
>>> Sep  5 17:05:32 2014
>>> @@ -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}}
>>>
>>> Modified: compiler-rt/trunk/test/sanitizer_common/lit.common.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/lit.common.cfg?rev=217284&r1=217283&r2=217284&view=diff
>>>
>>> ==============================================================================
>>> --- compiler-rt/trunk/test/sanitizer_common/lit.common.cfg (original)
>>> +++ compiler-rt/trunk/test/sanitizer_common/lit.common.cfg Fri Sep  5
>>> 17:05:32 2014
>>> @@ -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):
>>>
>>> Modified: compiler-rt/trunk/test/tsan/lit.cfg
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/lit.cfg?rev=217284&r1=217283&r2=217284&view=diff
>>>
>>> ==============================================================================
>>> --- compiler-rt/trunk/test/tsan/lit.cfg (original)
>>> +++ compiler-rt/trunk/test/tsan/lit.cfg Fri Sep  5 17:05:32 2014
>>> @@ -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:
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140905/33dc6b76/attachment.html>


More information about the llvm-commits mailing list