[llvm-commits] [PATCH] [ASan] Link with the dynamic runtime on OS X
Alexander Potapenko
glider at google.com
Tue Dec 18 06:45:47 PST 2012
Hi kcc, samsonov,
This patch changes the behavior of the -fsanitize=address flag, making it use the dynamic runtime library (libclang_rt.asan_osx_dynamic.dylib) instead of the static one. It also drops the CoreFoundation dependency, since the dynamic runtime doesn't need it.
This change is to be landed after http://llvm-reviews.chandlerc.com/D216
http://llvm-reviews.chandlerc.com/D223
Files:
lib/Driver/ToolChains.cpp
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp
+++ lib/Driver/ToolChains.cpp
@@ -342,12 +342,10 @@
getDriver().Diag(diag::err_drv_clang_unsupported_per_platform)
<< "-fsanitize=address";
} else {
- AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.asan_osx.a", true);
+ AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.asan_osx_dynamic.dylib", true);
- // The ASAN runtime library requires C++ and CoreFoundation.
+ // The ASAN runtime library requires C++.
AddCXXStdlibLibArgs(Args, CmdArgs);
- CmdArgs.push_back("-framework");
- CmdArgs.push_back("CoreFoundation");
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D223.1.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121218/9b4b86f4/attachment.bin>
More information about the llvm-commits
mailing list