<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 11/30/18 8:27 AM, Brian Gesiak via llvm-dev wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAN7MxmUf2jUgs=0MVmRC3bsihn=j1WA6-yz-1tWQs4_corAN9A@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hello all,
<div><br>
</div>
<div>Earlier this week I sent up <a href="https://reviews.llvm.org/D54884" moz-do-not-send="true">https://reviews.llvm.org/D54884</a>, which changes how bugpoint finds executables it relies upon to reduce programs. Specifically:</div>
<div><br>
</div>
<div>- Before: bugpoint would only look for 'opt' in the user's PATH</div>
<div>- After: bugpoint looks for 'opt' in the user's PATH, and if it doesn't find it, looks for 'opt' in the same directory as the bugpoint executable</div>
<div><br>
</div>
<div>I made this change because it saves me keystrokes: I always use bugpoint from a source build, and so it's always placed in a build directory next to opt. By searching there, I no longer need to pass it the --opt-command option. I noticed that tools like
 Clang & lld behave this way as well.</div>
<div><br>
</div>
<div>On the patch Davide Italiano mentions that he's always found it strange that bugpoint looks in the PATH at all! So I'm wondering: should I modify my patch to change bugpoint's behavior, and no longer have it look up tools like 'opt' in the user PATH?</div>
</div>
</div>
</div>
</blockquote>
<p>Yes. It has certainly been a long-term annoyance that to make bugpoint use the opt built with bugpoint, I needed to change the PATH, or similar, when using the corresponding opt almost always what I want to do</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:CAN7MxmUf2jUgs=0MVmRC3bsihn=j1WA6-yz-1tWQs4_corAN9A@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div>On the one hand, I think people like Davide would find this more intuitive. On the other, I notice bugpoint also relies on tools like valgrind, which are typically not placed in the same build folder as LLVM tools, so those might be harder to look up and
 find.</div>
</div>
</div>
</div>
</blockquote>
<p>valgrind or other "system" tools should still do a PATH lookup. That's a different matter.<br>
</p>
<p> -Hal<br>
</p>
<blockquote type="cite" cite="mid:CAN7MxmUf2jUgs=0MVmRC3bsihn=j1WA6-yz-1tWQs4_corAN9A@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>I'm looking for people who use bugpoint regularly to respond with their own examples and use cases, to better inform me about how bugpoint should behave. Please let me know which PATH lookup behavior makes the most sense to you!</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>- Brian Gesiak</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>