[PATCH] D37631: [libFuzzer] Support using libc++

Eric Fiselier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 20:56:34 PDT 2017


EricWF added a comment.

In https://reviews.llvm.org/D37631#869128, @phosek wrote:

> In https://reviews.llvm.org/D37631#865602, @kcc wrote:
>
> > So, how about linking a full private version of libc++? 
> >  Is that even possible?
>
>
> I think it's possible but it won't be pretty. It's also complicated by the fact that libFuzzer is built as static library. What we would have to do is to build custom libc++ using a custom namespace, then build libFuzzer against that library, and finally combine the two static libraries together similarly to what libc++ is doing when merging libc++abi (https://github.com/llvm-mirror/libcxx/blob/master/lib/CMakeLists.txt#L268). I can give it a try if you're fine with that solution.


This sounds reasonable to me. Libc++ could add an option that allows you to control the inline namespace it uses, hence giving you a version of libc++ that isn't necessarily *private* but is, at least, local to libFuzzer. After merging the archives, you shouldn't depend or conflict with external libc++ versions (**except for non-versioned types like exceptions, i'm not sure how relevant that is)


Repository:
  rL LLVM

https://reviews.llvm.org/D37631





More information about the llvm-commits mailing list