[PATCH] Add compiler support for dynamic Asan runtime

Yury Gribov tetra2005 at gmail.com
Tue Mar 25 21:56:58 PDT 2014



================
Comment at: lib/Driver/Tools.cpp:1882
@@ -1865,3 +1881,3 @@
     SmallString<128> LibAsan = getCompilerRTLibDir(TC);
     llvm::sys::path::append(LibAsan,
                             (Twine("libclang_rt.asan-") +
----------------
Alexey Samsonov wrote:
> Please put this Android-specific logic to getSanitizerRTLibName. Then you'll be able to merge this block with the following one (and quit early on Android - there's no asan-preinit there.
But this would change behavior for other runtimes (Ubsan, etc.).

================
Comment at: lib/Driver/Tools.cpp:1899
@@ +1898,3 @@
+    const char *LibAsanStaticPart = Shared ? "asan-preinit" : "asan";
+    bool ExportSymbols = !Shared,
+      LinkDeps = !Shared,
----------------
Alexey Samsonov wrote:
> Oh, let's switch back to a single
>   addSanitizerRTLinkFlags(TC, Args, CmdArgs, LibAsanStaticPart,
>     /* BeforeLibStdCXX */ true, /* Export Symbols */ !Shared, /* Link Deps */ !Shared);
> Sorry for changing my mind.
Are you sure about those intra-comment whites? We do not use them anywhere else.


http://llvm-reviews.chandlerc.com/D3043



More information about the llvm-commits mailing list