diff options
| author | Alexander Potapenko <glider@google.com> | 2013-09-20 08:09:51 +0000 |
|---|---|---|
| committer | Alexander Potapenko <glider@google.com> | 2013-09-20 08:09:51 +0000 |
| commit | ce87633ff9a44e51602633ddfd92b65630b9c6d0 (patch) | |
| tree | 37609e406cc3863c26ff5cf002b589a3071ff926 /clang/lib/Driver/Tools.cpp | |
| parent | fc8ca53329a623846c5211e804cd152b6e368d32 (diff) | |
| download | bcm5719-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.cpp | 14 |
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"); |

