r189496 - clang-cl: Pass -debug to the linker when using -fsanitize=address

Hans Wennborg hans at hanshq.net
Wed Aug 28 10:36:07 PDT 2013


Author: hans
Date: Wed Aug 28 12:36:07 2013
New Revision: 189496

URL: http://llvm.org/viewvc/llvm-project?rev=189496&view=rev
Log:
clang-cl: Pass -debug to the linker when using -fsanitize=address

Modified:
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/test/Driver/cl-link.c

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=189496&r1=189495&r2=189496&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Aug 28 12:36:07 2013
@@ -6569,6 +6569,7 @@ void visualstudio::Link::ConstructJob(Co
   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(

Modified: cfe/trunk/test/Driver/cl-link.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-link.c?rev=189496&r1=189495&r2=189496&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-link.c (original)
+++ cfe/trunk/test/Driver/cl-link.c Wed Aug 28 12:36:07 2013
@@ -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"





More information about the cfe-commits mailing list