<div dir="auto">But if you have alternative ideas on how to address this use case (statically linking a custom libc++ without having to duplicate all the default libs, in particular built-in ones like libbuiltin-rt), I'm happy to hear them, or course :-)</div><div class="gmail_extra"><br><div class="gmail_quote">On Jul 23, 2017 3:17 PM, "Nico Weber" <<a href="mailto:thakis@chromium.org">thakis@chromium.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="quoted-text">On Sun, Jul 23, 2017 at 3:08 PM, Joerg Sonnenberger via Phabricator via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">joerg added a comment.<br>
<br>
I don't really like this.</blockquote><div><br></div></div><div>That's cool, you don't need to use the flag.</div><div class="quoted-text"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The reason why -lm is added explicitly on many targets is because the C++ STL typically depends on it and that means for static linking and broken ELF linkers, it will be necessary to link against it explicitly.<br></blockquote><div><br></div></div><div>The driver adds -lm at the end, so it'll work if you add your static libc++ flag in user flags, and then -lm gets added at the end. But from what I understand, -lm is also there as a usability thing to make c++ a bit more accessible than c in this regard, not just for the c++ standard library. (Also, if you're trying to statically link your c++ lib, it's possible you have some influence on your linker as well.)</div><div class="quoted-text"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
There is also the question on whether any platform we have currently uses separate STL and ABI libraries and it is not clear whether the flag should handle both.<br></blockquote><div><br></div></div><div>Yes, it should handle both.</div><div class="quoted-text"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D35780" rel="noreferrer" target="_blank">https://reviews.llvm.org/D3578<wbr>0</a><br>
<div class="m_2165221231449691119HOEnZb"><div class="m_2165221231449691119h5"><br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</div></div></blockquote></div></div><br></div></div>
</blockquote></div><br></div>