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

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 17:24:05 PDT 2017


phosek added a comment.

In https://reviews.llvm.org/D37631#876860, @vitalybuka wrote:

> > Yeah, that' what I was thinking. I can update the lit configuration to use -lc++ even on Linux if `LLVM_ENABLE_LIBCXX` is set so we get coverage on bots. Is that fine with you?
>
> SGTM
>  but is any reason to use -lc++ instead of --stdlib=libc++ ?


One issue with `LLVM_ENABLE_LIBCXX` that I just ran into is that it uses libc++ from the host compiler, but when building and running tests, we're using the just built Clang which might have a different version (e.g. in my case the host has 4.0.0 while target is 6.0.0dev) which causes issues. This is not a problem with `runtimes/` build where compiler-rt is always built using just built Clang, but it's a problem when compiler-rt is built in `projects/`. I don't think we can rely on `LLVM_ENABLE_LIBCXX` or just `-stdlib=libc++` for that reason, we always have explicitly point out to the right libc++ which should be used.


Repository:
  rL LLVM

https://reviews.llvm.org/D37631





More information about the llvm-commits mailing list