[PATCH] Add compiler support for dynamic Asan runtime

Alexey Samsonov samsonov at google.com
Wed Mar 26 06:57:56 PDT 2014



================
Comment at: lib/Driver/Tools.cpp:1899
@@ +1898,3 @@
+    const char *LibAsanStaticPart = Shared ? "asan-preinit" : "asan";
+    bool ExportSymbols = !Shared,
+      LinkDeps = !Shared,
----------------
Yury Gribov wrote:
> 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.
Um, yes, there shouldn't be whitespaces.

================
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-") +
----------------
Yury Gribov wrote:
> 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.).
That's ok, we have only ASan for Android at the moment.


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



More information about the llvm-commits mailing list