clang-cl: pass -debug flag to the linker when compiling with debug info

llvm-svn: 207233
This commit is contained in:
Hans Wennborg 2014-04-25 16:24:19 +00:00
parent 190cc60a2d
commit bbb5f07626
2 changed files with 8 additions and 0 deletions

View File

@ -7435,6 +7435,10 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-nologo");
if (Args.hasArg(options::OPT_g_Group)) {
CmdArgs.push_back("-debug");
}
bool DLL = Args.hasArg(options::OPT__SLASH_LD, options::OPT__SLASH_LDd);
if (DLL) {

View File

@ -31,3 +31,7 @@
// ASAN-DLL: "-incremental:no"
// ASAN-DLL: "{{.*}}clang_rt.asan_dll_thunk-i386.lib"
// ASAN-DLL: "{{.*}}cl-link{{.*}}.obj"
// RUN: %clang_cl /Zi /Tc%s -### 2>&1 | FileCheck --check-prefix=DEBUG %s
// DEBUG: link.exe
// DEBUG: "-debug"