[llvm-dev] moving libfuzzer to compiler-rt?

Kostya Serebryany via llvm-dev llvm-dev at lists.llvm.org
Tue May 2 16:28:12 PDT 2017


On Tue, May 2, 2017 at 12:26 PM, George Karpenkov <ekarpenkov at apple.com>
wrote:

> Hi All,
>
> Currently libfuzzer depends on (often freshly built) clang, yet the
> dependency is not explicitly specified
> in cmake.
>

Correct.


> That leads to various issues: for instance, it’s not possible to check out
> LLVM repo and run libfuzzer
> tests: one would often need to compile fresh clang first, and then create
> a separate build directory,
> where libfuzzer could be tested.
> For the buildbot this problem is approached by grabbing a freshly built
> binary from another buildbot
> and using that for testing.
>

And correct again.


>
> Needless to say, that could be quite annoying.
> Additionally, my recent changes start using libfuzzer from Clang driver:
> and finding the actual archive file
> requires some hardcoding of directory paths, as one would need to go up
> the tree from the Clang binary
> (in swift, for example, the situation is even worse, as the path to Clang
> is a symlink, and getting an archive file
> from the LLVM tree would require going quite a few levels up).
>
> From my understanding, all these problems can be solved entirely
> by moving libfuzzer to compiler-rt, where (other) sanitizers already
> reside.
>

Yes, that might be a reasonable thing to do.
I am trying to remember the reasons why we've put libFuzzer into llvm and
not into compiler-rt in the first place, and failing to do so.

>
> Any thoughts on the suggestion?
>
> It would be still possible to compile just libfuzzer with no dependencies,
> by simply making a partial checkout from SVN,
> and only the repo path would change.
>

This would cause some annoyance for me and maybe some users, but nothing we
can't tolerate.
Still what are our other options?

* wait for the mono repo to happen, then we'll be able to make libFuzzer
depend on clang. (Or no?)
* move libFuzzer to a separate repo, parallel to compiler-rt? (not a large
win, just listing as a choice)
* anything else?

Does anyone see good reasons why libFuzzer should remain in llvm repo (as
opposed to moving it to compiler-rt)?


--kcc


>
> George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170502/b96b9336/attachment.html>


More information about the llvm-dev mailing list