<div dir="ltr">So make them available in TLI under the condition T.isGNUEnvironment() would be quite enough?<div><br></div><div>Currently the patch contains the condition </div><div>"<span class="gmail-k" style="display:inline;word-break:break-all;color:rgb(170,64,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">if</span><span style="color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap;background-color:rgba(151,234,151,0.6)"> </span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">(</span><span class="gmail-n" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">T</span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">.</span><span class="gmail-n" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">isOSLinux</span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">()</span><span style="color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap;background-color:rgba(151,234,151,0.6)"> </span><span class="gmail-o" style="display:inline;word-break:break-all;color:rgb(170,34,17);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">||</span><span style="color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap;background-color:rgba(151,234,151,0.6)"> </span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">(</span><span class="gmail-n" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">T</span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">.</span><span class="gmail-n" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">isAndroid</span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">()</span><span style="color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap;background-color:rgba(151,234,151,0.6)"> </span><span class="gmail-o" style="display:inline;word-break:break-all;color:rgb(170,34,17);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">&&</span><span style="color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap;background-color:rgba(151,234,151,0.6)"> </span><span class="gmail-o" style="display:inline;word-break:break-all;color:rgb(170,34,17);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">!</span><span class="gmail-n" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">T</span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">.</span><span class="gmail-n" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">isAndroidVersionLT</span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">(</span><span class="gmail-mi" style="display:inline;word-break:break-all;color:rgb(96,18,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">28</span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">)))</span><span style="color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap;background-color:rgba(151,234,151,0.6)"> </span><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">{"</span></div><div><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap"><br></span></div><div><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">Android P's bionic has them too. But not sure how the ideal condition would like.</span></div><div><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap"><br></span></div><div><span class="gmail-p" style="display:inline;word-break:break-all;color:rgb(0,0,0);font-family:Menlo,Consolas,Monaco,monospace;font-size:11px;white-space:pre-wrap">Thanks</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-09 2:23 GMT+02:00 Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span class="">
<p><br>
</p>
<div class="m_9098817437071399813moz-cite-prefix">On 05/08/2018 07:13 PM, Friedman, Eli
via llvm-dev wrote:<br>
</div>
<blockquote type="cite">
<div class="m_9098817437071399813moz-cite-prefix">It's probably worth going into a
little more detail... a lot of people read llvmdev, and most of
them won't click the link or follow the whole discussion.<br>
<br>
The transform in question is replacing "fputc(...)" with
"fputc_unlocked(...)" when we can prove the FILE* doesn't
escape. The question is whether it's safe for the compiler to
emit a call to fputc_unlocked() on Linux, given it's a
non-standard extension. The bit I'm most worried about is some
user defining a function named fputc_unlocked; it isn't a
reserved name according to the C standard, so there's no way to
ensure we're actually calling the glibc fputc_unlocked.<br>
</div>
</blockquote>
<br></span>
Don't we generally assume the availability of glibc extensions when
-gnu is in the triple?<br>
<br>
-Hal<span class=""><br>
<br>
<blockquote type="cite">
<div class="m_9098817437071399813moz-cite-prefix"> <br>
Suggestions welcome.<br>
<br>
-Eli<br>
<br>
On 5/8/2018 4:59 PM, Dávid Bolvanský via llvm-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>Please check this patch:</div>
<div><a href="https://reviews.llvm.org/D45736" target="_blank">https://reviews.llvm.org/<wbr>D45736</a><br>
</div>
<div><br>
</div>
<div>as Eli noted, other opinions are highly welcomed..</div>
<div><br>
</div>
<div>Thanks</div>
</div>
<br>
<fieldset class="m_9098817437071399813mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
LLVM Developers mailing list
<a class="m_9098817437071399813moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_9098817437071399813moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<p><br>
</p>
<pre class="m_9098817437071399813moz-signature" cols="72">--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
<br>
<fieldset class="m_9098817437071399813mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
LLVM Developers mailing list
<a class="m_9098817437071399813moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_9098817437071399813moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
</span><span class="HOEnZb"><font color="#888888"><pre class="m_9098817437071399813moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</font></span></div>
</blockquote></div><br></div>