<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 12:26 PM, George Karpenkov <span dir="ltr"><<a href="mailto:ekarpenkov@apple.com" target="_blank">ekarpenkov@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
Currently libfuzzer depends on (often freshly built) clang, yet the dependency is not explicitly specified<br>
in cmake.<br></blockquote><div><br></div><div>Correct. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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></blockquote><div><br></div><div>And correct again. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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></blockquote><div><br></div><div>Yes, that might be a reasonable thing to do. </div><div>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.  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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></blockquote><div><br></div><div>This would cause some annoyance for me and maybe some users, but nothing we can't tolerate. </div><div>Still what are our other options? </div><div><br></div><div>* wait for the mono repo to happen, then we'll be able to make libFuzzer depend on clang. (Or no?)</div><div>* move libFuzzer to a separate repo, parallel to compiler-rt? (not a large win, just listing as a choice)</div><div>* anything else? </div><div><br></div><div>Does anyone see good reasons why libFuzzer should remain in llvm repo (as opposed to moving it to compiler-rt)? </div><div><br></div><div><br></div><div>--kcc </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="m_-6510683782038455872HOEnZb"><font color="#888888"><br>
George</font></span></blockquote></div><br></div></div>