summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2013-09-20 08:09:51 +0000
committerAlexander Potapenko <glider@google.com>2013-09-20 08:09:51 +0000
commitce87633ff9a44e51602633ddfd92b65630b9c6d0 (patch)
tree37609e406cc3863c26ff5cf002b589a3071ff926 /clang/lib/Driver/Tools.cpp
parentfc8ca53329a623846c5211e804cd152b6e368d32 (diff)
downloadbcm5719-llvm-ce87633ff9a44e51602633ddfd92b65630b9c6d0.tar.gz
bcm5719-llvm-ce87633ff9a44e51602633ddfd92b65630b9c6d0.zip
[ASan] Do not imply -undefined dynamic_lookup when linking dylibs with -fsanitize=address.
Instead add the ASan runtime to the linker command line so that only the ASan API functions can be undefined in the target library. Fixes http://llvm.org/bugs/show_bug.cgi?id=17275 llvm-svn: 191076
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index a9d3acc2da4..c2ba2e93afd 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4817,20 +4817,6 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddAllArgs(CmdArgs, options::OPT_L);
- const SanitizerArgs &Sanitize =
- getToolChain().getDriver().getOrParseSanitizerArgs(Args);
- // If we're building a dynamic lib with -fsanitize=address,
- // unresolved symbols may appear. Mark all
- // of them as dynamic_lookup. Linking executables is handled in
- // lib/Driver/ToolChains.cpp.
- if (Sanitize.needsAsanRt()) {
- if (Args.hasArg(options::OPT_dynamiclib) ||
- Args.hasArg(options::OPT_bundle)) {
- CmdArgs.push_back("-undefined");
- CmdArgs.push_back("dynamic_lookup");
- }
- }
-
if (Args.hasArg(options::OPT_fopenmp))
// This is more complicated in gcc...
CmdArgs.push_back("-lgomp");
OpenPOWER on IntegriCloud