]> granicus.if.org Git - clang/commitdiff
clang-cl: Pass -debug to the linker when using -fsanitize=address
authorHans Wennborg <hans@hanshq.net>
Wed, 28 Aug 2013 17:36:07 +0000 (17:36 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 28 Aug 2013 17:36:07 +0000 (17:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189496 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Driver/cl-link.c

index c30c45d26bd165e78b4ab562ba06ac6304667cef..6862e76df6e8ff467be5d40b1a8e0388ce7953ff 100644 (file)
@@ -6569,6 +6569,7 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
   CmdArgs.push_back("-nologo");
 
   if (getToolChain().getDriver().getOrParseSanitizerArgs(Args).needsAsanRt()) {
+    CmdArgs.push_back(Args.MakeArgString("-debug"));
     SmallString<128> LibSanitizer(getToolChain().getDriver().ResourceDir);
     // FIXME: Handle 64-bit. Use asan_dll_thunk.dll when building a DLL.
     llvm::sys::path::append(
index 76f4f8b27cb19f2b0015524e71c1910cff6a29a4..b6d14d6dff784d8bce7ca2bf520d937873790e7d 100644 (file)
@@ -13,5 +13,6 @@
 
 // RUN: %clang_cl /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN %s
 // ASAN: link.exe
+// ASAN: "-debug"
 // ASAN: "{{.*}}clang_rt.asan-i386.lib"
 // ASAN: "{{.*}}cl-link{{.*}}.obj"