[compiler-rt] r318546 - Enable PDB generation with lld in asan and cfi tests on Windows.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 11:49:41 PST 2017


Author: pcc
Date: Fri Nov 17 11:49:41 2017
New Revision: 318546

URL: http://llvm.org/viewvc/llvm-project?rev=318546&view=rev
Log:
Enable PDB generation with lld in asan and cfi tests on Windows.

PDB emission now works well enough that we can rely on it for these
tests to pass.

Differential Revision: https://reviews.llvm.org/D40188

Modified:
    compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc
    compiler-rt/trunk/test/cfi/lit.cfg
    compiler-rt/trunk/test/cfi/stats.cpp
    compiler-rt/trunk/test/lit.common.cfg

Modified: compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc?rev=318546&r1=318545&r2=318546&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Windows/fuse-lld.cc Fri Nov 17 11:49:41 2017
@@ -2,11 +2,7 @@
 //
 // REQUIRES: lld-available
 //
-// FIXME: Use -fuse-ld=lld after the old COFF linker is removed.
-// FIXME: Test will fail until we add flags for requesting dwarf or cv.
-// RUNX: %clangxx_asan -O2 %s -o %t.exe -fuse-ld=lld -Wl,-debug
-// RUN: %clangxx_asan -c -O2 %s -o %t.o -g -gdwarf
-// RUN: lld-link %t.o -out:%t.exe -debug -nopdb -defaultlib:libcmt %asan_lib %asan_cxx_lib
+// RUN: %clangxx_asan -O2 %s -o %t.exe -g -gcodeview -fuse-ld=lld -Wl,-debug
 // RUN: not %run %t.exe 2>&1 | FileCheck %s
 
 #include <stdlib.h>

Modified: compiler-rt/trunk/test/cfi/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/cfi/lit.cfg?rev=318546&r1=318545&r2=318546&view=diff
==============================================================================
--- compiler-rt/trunk/test/cfi/lit.cfg (original)
+++ compiler-rt/trunk/test/cfi/lit.cfg Fri Nov 17 11:49:41 2017
@@ -32,6 +32,7 @@ if config.lto_supported:
   config.substitutions.append((r"%clangxx_cfi_diag ", clang_cfi + cxx + non_dso + diag))
   config.substitutions.append((r"%clangxx_cfi_dso ", clang_cfi + cxx + dso))
   config.substitutions.append((r"%clangxx_cfi_dso_diag ", clang_cfi + cxx + dso + diag))
+  config.substitutions.append((r"%debug_info_flags", ' '.join(config.debug_info_flags)))
 else:
   config.unsupported = True
 

Modified: compiler-rt/trunk/test/cfi/stats.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/cfi/stats.cpp?rev=318546&r1=318545&r2=318546&view=diff
==============================================================================
--- compiler-rt/trunk/test/cfi/stats.cpp (original)
+++ compiler-rt/trunk/test/cfi/stats.cpp Fri Nov 17 11:49:41 2017
@@ -1,4 +1,4 @@
-// RUN: %clangxx_cfi -g -fsanitize-stats -o %t %s
+// RUN: %clangxx_cfi %debug_info_flags -fsanitize-stats -o %t %s
 // RUN: env SANITIZER_STATS_PATH=%t.stats %run %t
 // RUN: sanstats %t.stats | FileCheck %s
 

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=318546&r1=318545&r2=318546&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Fri Nov 17 11:49:41 2017
@@ -254,8 +254,7 @@ elif config.host_os == 'Linux' and is_li
 elif config.host_os == 'Windows' and is_windows_lto_supported():
   config.lto_supported = True
   config.lto_launch = []
-  # FIXME: Remove -nopdb when PDB writing is ready.
-  config.lto_flags = ["-fuse-ld=lld -Wl,-nopdb"]
+  config.lto_flags = ["-fuse-ld=lld"]
 else:
   config.lto_supported = False
 




More information about the llvm-commits mailing list