From d024c1c803a1558c55f86923a8235e907699ab8e Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 30 Aug 2013 10:50:52 +0000 Subject: [PATCH] clang-cl: Pass -incremental:no to linker when using ASan llvm-svn: 189664 --- clang/lib/Driver/Tools.cpp | 1 + clang/test/Driver/cl-link.c | 1 + 2 files changed, 2 insertions(+) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 9633d6b3e25c..2c036317a5d8 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -6573,6 +6573,7 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA, if (getToolChain().getDriver().getOrParseSanitizerArgs(Args).needsAsanRt()) { CmdArgs.push_back(Args.MakeArgString("-debug")); + CmdArgs.push_back(Args.MakeArgString("-incremental:no")); SmallString<128> LibSanitizer(getToolChain().getDriver().ResourceDir); // FIXME: Handle 64-bit. Use asan_dll_thunk.dll when building a DLL. llvm::sys::path::append( diff --git a/clang/test/Driver/cl-link.c b/clang/test/Driver/cl-link.c index b6d14d6dff78..f6e18b8f1a61 100644 --- a/clang/test/Driver/cl-link.c +++ b/clang/test/Driver/cl-link.c @@ -14,5 +14,6 @@ // RUN: %clang_cl /Tc%s -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN %s // ASAN: link.exe // ASAN: "-debug" +// ASAN: "-incremental:no" // ASAN: "{{.*}}clang_rt.asan-i386.lib" // ASAN: "{{.*}}cl-link{{.*}}.obj"