diff options
author | Alexander Potapenko <glider@google.com> | 2013-01-22 09:16:03 +0000 |
---|---|---|
committer | Alexander Potapenko <glider@google.com> | 2013-01-22 09:16:03 +0000 |
commit | 454028e1beed117f98d7e5157ba47e784e521f72 (patch) | |
tree | 90c1dce02e8c3122b091dcad87e13981bb79e06b | |
parent | 6f7eeb9a977ca2ed31a2c749fa421d6c850d38d5 (diff) |
[ASan] Link with the dynamic runtime on OS X
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173135 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 5b7a6da277..6f68f1c577 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -339,12 +339,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, 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"); } } |