From dd01ddbe67da0a2081aa111a8a818b30702babb2 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 17 Nov 2017 19:49:41 +0000 Subject: [PATCH] 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 --- compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc | 6 +----- compiler-rt/test/cfi/lit.cfg | 1 + compiler-rt/test/cfi/stats.cpp | 2 +- compiler-rt/test/lit.common.cfg | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc b/compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc index c20e5ff6c786..2aee0385d158 100644 --- a/compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc +++ b/compiler-rt/test/asan/TestCases/Windows/fuse-lld.cc @@ -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 diff --git a/compiler-rt/test/cfi/lit.cfg b/compiler-rt/test/cfi/lit.cfg index 301d932ecbca..7dae9a0d5a7e 100644 --- a/compiler-rt/test/cfi/lit.cfg +++ b/compiler-rt/test/cfi/lit.cfg @@ -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 diff --git a/compiler-rt/test/cfi/stats.cpp b/compiler-rt/test/cfi/stats.cpp index 56cc2dd51b81..ca6b3bf0df48 100644 --- a/compiler-rt/test/cfi/stats.cpp +++ b/compiler-rt/test/cfi/stats.cpp @@ -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 diff --git a/compiler-rt/test/lit.common.cfg b/compiler-rt/test/lit.common.cfg index 48987dfdadd9..56d4fef4ed18 100644 --- a/compiler-rt/test/lit.common.cfg +++ b/compiler-rt/test/lit.common.cfg @@ -254,8 +254,7 @@ elif config.host_os == 'Linux' and is_linux_lto_supported(): 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