Skip to content

Commit dd01ddb

Browse files
committed
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 llvm-svn: 318546
1 parent 5d0199a commit dd01ddb

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
//
33
// REQUIRES: lld-available
44
//
5-
// FIXME: Use -fuse-ld=lld after the old COFF linker is removed.
6-
// FIXME: Test will fail until we add flags for requesting dwarf or cv.
7-
// RUNX: %clangxx_asan -O2 %s -o %t.exe -fuse-ld=lld -Wl,-debug
8-
// RUN: %clangxx_asan -c -O2 %s -o %t.o -g -gdwarf
9-
// RUN: lld-link %t.o -out:%t.exe -debug -nopdb -defaultlib:libcmt %asan_lib %asan_cxx_lib
5+
// RUN: %clangxx_asan -O2 %s -o %t.exe -g -gcodeview -fuse-ld=lld -Wl,-debug
106
// RUN: not %run %t.exe 2>&1 | FileCheck %s
117

128
#include <stdlib.h>

compiler-rt/test/cfi/lit.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ if config.lto_supported:
3232
config.substitutions.append((r"%clangxx_cfi_diag ", clang_cfi + cxx + non_dso + diag))
3333
config.substitutions.append((r"%clangxx_cfi_dso ", clang_cfi + cxx + dso))
3434
config.substitutions.append((r"%clangxx_cfi_dso_diag ", clang_cfi + cxx + dso + diag))
35+
config.substitutions.append((r"%debug_info_flags", ' '.join(config.debug_info_flags)))
3536
else:
3637
config.unsupported = True
3738

compiler-rt/test/cfi/stats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx_cfi -g -fsanitize-stats -o %t %s
1+
// RUN: %clangxx_cfi %debug_info_flags -fsanitize-stats -o %t %s
22
// RUN: env SANITIZER_STATS_PATH=%t.stats %run %t
33
// RUN: sanstats %t.stats | FileCheck %s
44

compiler-rt/test/lit.common.cfg

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ elif config.host_os == 'Linux' and is_linux_lto_supported():
254254
elif config.host_os == 'Windows' and is_windows_lto_supported():
255255
config.lto_supported = True
256256
config.lto_launch = []
257-
# FIXME: Remove -nopdb when PDB writing is ready.
258-
config.lto_flags = ["-fuse-ld=lld -Wl,-nopdb"]
257+
config.lto_flags = ["-fuse-ld=lld"]
259258
else:
260259
config.lto_supported = False
261260

0 commit comments

Comments
 (0)