+ kcc the author of the libasan library. Koystya, does libasan build (need to ) depend on C++ library ?
thanks, David On Thu, Oct 18, 2012 at 12:26 PM, Xinliang David Li <davi...@google.com> wrote: > On Thu, Oct 18, 2012 at 11:22 AM, Jakub Jelinek <ja...@redhat.com> wrote: >> On Thu, Oct 18, 2012 at 11:15:33AM -0700, Xinliang David Li wrote: >>> >> --- Makefile.def (revision 192487) >>> >> +++ Makefile.def (working copy) >>> >> @@ -119,6 +119,7 @@ target_modules = { module= libstdc++-v3; >>> >> lib_path=src/.libs; >>> >> raw_cxx=true; }; >>> >> target_modules = { module= libmudflap; lib_path=.libs; }; >>> >> +target_modules = { module= libasan; lib_path=.libs; }; >>> >> target_modules = { module= libssp; lib_path=.libs; }; >>> >> target_modules = { module= newlib; }; >>> >> target_modules = { module= libgcc; bootstrap=true; no_check=true; }; >>> > >>> > Shouldn't libasan, given it is a C++ shared library, depend on >>> > libstdc++-v3? >>> > >>> >>> I don't think it should depend on any C++ libraries. libasan is >>> written in C++, but I don't see any C++ features that require C++ >>> runtime support (libstdc++, libcsup++) are used -- otherwise the >>> archive libasan can not be used with C program. >> >> Is it compiled with -fno-exceptions -fno-rtti? Without it it would >> require either libstdc++ or libsupc++. I see it uses at least >> #include <new>, so even if it doesn't link against libstdc++, it needs >> its headers being setup and thus need to depend at the toplevel >> on libstdc++ being built (and likely needs to use >> `$(...)/libstdc++-v3/scripts/testsuite_flags --build-includes` >> ) when compiling. > > I looked at the library built with LLVM -- it does not reference any > exception handling routines, nor operator new, rtti related routines. > > I am not sure if the inclusion of <new> is needed -- it is used in > asan_new_delete.cc which defines replacement for global new and > delete, I think. > > David > >> >> Jakub