[compiler-rt] r302924 - [ubsan] Enable debug info in test binaries

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Fri May 12 10:06:16 PDT 2017


Author: rnk
Date: Fri May 12 12:06:16 2017
New Revision: 302924

URL: http://llvm.org/viewvc/llvm-project?rev=302924&view=rev
Log:
[ubsan] Enable debug info in test binaries

This fixes tests that use debug info to check ubsan stack traces.  One
was XFAILd on Windows and the other was actively failing for weeks.

Modified:
    compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp
    compiler-rt/trunk/test/ubsan/lit.common.cfg

Modified: compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp?rev=302924&r1=302923&r2=302924&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp (original)
+++ compiler-rt/trunk/test/ubsan/TestCases/TypeCheck/misaligned.cpp Fri May 12 12:06:16 2017
@@ -1,8 +1,4 @@
-// FIXME: This test currently fails on Windows because we use the MSVC linker,
-// which throws away DWARF debug info.
-// XFAIL: win32
-//
-// RUN: %clangxx -fsanitize=alignment -g %s -O3 -o %t
+// RUN: %clangxx -fsanitize=alignment %s -O3 -o %t
 // RUN: %run %t l0 && %run %t s0 && %run %t r0 && %run %t m0 && %run %t f0 && %run %t n0 && %run %t u0
 // RUN: %run %t l1 2>&1 | FileCheck %s --check-prefix=CHECK-LOAD --strict-whitespace
 // RUN: %run %t s1 2>&1 | FileCheck %s --check-prefix=CHECK-STORE

Modified: compiler-rt/trunk/test/ubsan/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/lit.common.cfg?rev=302924&r1=302923&r2=302924&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/lit.common.cfg (original)
+++ compiler-rt/trunk/test/ubsan/lit.common.cfg Fri May 12 12:06:16 2017
@@ -57,7 +57,7 @@ config.substitutions.append(('%env_ubsan
 def build_invocation(compile_flags):
   return " " + " ".join([config.clang] + compile_flags) + " "
 
-target_cflags = [get_required_attr(config, "target_cflags")]
+target_cflags = [get_required_attr(config, "target_cflags")] + config.debug_info_flags
 clang_ubsan_cflags += target_cflags
 clang_ubsan_cxxflags = config.cxx_mode_flags + clang_ubsan_cflags
 




More information about the llvm-commits mailing list