On Mon, 22 Jul 2024, 22:20 Phil Phil, <heidegg@xxxxxxxxxxx> wrote: > But clang works with a g++ built libstdc++ right? > Yes. Are there patches that eliminate msan false positives from a g++ built > libstdc++? > I don't know, what/where are the false positives? How would that work? G++ can't add msan instrumentation, because it doesn't support msan. ------------------------------ > *From:* Jonathan Wakely <jwakely.gcc@xxxxxxxxx> > *Sent:* Monday, July 22, 2024 9:05 PM > *To:* Phil Phil <heidegg@xxxxxxxxxxx> > *Cc:* gcc-help@xxxxxxxxxxx <gcc-help@xxxxxxxxxxx> > *Subject:* Re: Building libstdc++ for MemorySanitizer > > On Mon, 22 Jul 2024 at 21:55, Phil Phil via Gcc-help > <gcc-help@xxxxxxxxxxx> wrote: > > > > Greetings, > > > > I'm currently trying to build a large C++ project for MemorySanitizer > with clang since g++ doesn't support MSan as far as I know. I currently try > to build an instrumented libc++ so I don't get false positives for Msan. > > > > Now since some libs we use still link against libstdc++ I would like to > ask if it is possible to build libstdc++ in the same way so it doesn't > produce false positives with MSan and if there is a manual for it. > > No. Building libstdc++ with clang (or anything except the matching > version of GCC that it's shipped with) is not officially supported. I > know a few people have done it and got it working, but you need to > hack the build yourself. >