<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 3:07 PM, Johan Engelen via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I'd like to add another perspective: LDC (LLVM D Compiler) can use libFuzzer and AddressSanitizer from compiler-rt, and it'd be great if building them would not require a fresh-built clang. I believe the only reason libFuzzer needs a fresh-built clang is because of the dependence on the sanitizer interface?</div></blockquote><div><br></div><div>Not really. libFuzzer depends on the coverage instrumentation applied to the target code.</div><div>I.e we can build libFuzzer with any compiler (even some old GCC) but we have to use a recent clang to build the target code (including libFuzzer's own tests). </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>compiler-rt can already be built without using clang, libFuzzer is a little more tricky: libFuzzer depends on <sanitizer/coverage_<wbr>interface.h>, </div></div></blockquote><div><br></div><div><br></div><div>Not any more, removed in r307858.</div><div>It loosely depends on sanitizer/lsan_interface.h though </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>note the angle brackets, meaning that you have to install compiler-rt's include files to have libFuzzer be in version-sync with the sanitizers.<div><div>My hope is that moving libFuzzer to compiler-rt will make it possible to build it together with the sanitizers, so that it is a little easier to build it for non-clang use cases.</div><div><br></div><div>Kind regards,</div><div>  Johan</div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="gmail-h5">On Tue, May 2, 2017 at 9:26 PM, George Karpenkov via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="gmail-h5">Hi All,<br>
<br>
Currently libfuzzer depends on (often freshly built) clang, yet the dependency is not explicitly specified<br>
in cmake.<br>
That leads to various issues: for instance, it’s not possible to check out LLVM repo and run libfuzzer<br>
tests: one would often need to compile fresh clang first, and then create a separate build directory,<br>
where libfuzzer could be tested.<br>
For the buildbot this problem is approached by grabbing a freshly built binary from another buildbot<br>
and using that for testing.<br>
<br>
Needless to say, that could be quite annoying.<br>
Additionally, my recent changes start using libfuzzer from Clang driver: and finding the actual archive file<br>
requires some hardcoding of directory paths, as one would need to go up the tree from the Clang binary<br>
(in swift, for example, the situation is even worse, as the path to Clang is a symlink, and getting an archive file<br>
from the LLVM tree would require going quite a few levels up).<br>
<br>
>From my understanding, all these problems can be solved entirely<br>
by moving libfuzzer to compiler-rt, where (other) sanitizers already reside.<br>
<br>
Any thoughts on the suggestion?<br>
<br>
It would be still possible to compile just libfuzzer with no dependencies, by simply making a partial checkout from SVN,<br>
and only the repo path would change.<br>
<br>
George<br></div></div><span class="gmail-">
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</span></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div></div>