<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 6:28 PM, Joerg Sonnenberger via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-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"><span class="">On Wed, Mar 16, 2016 at 02:28:01PM +0000, Rui Ueyama via llvm-commits wrote:<br>
> ruiu added inline comments.<br>
><br>
> ================<br>
> Comment at: ELF/Driver.cpp:148-149<br>
> @@ +147,4 @@<br>
> +  if (Config->Pie) {<br>
> +    if (Config->Shared)<br>
> +      error("-shared and -pie may not be used together");<br>
> +    if (Config->Static)<br>
> ----------------<br>
> I think this is also something that we are checking for errors too<br>
> eagerly. -shared implies -pie, so they are not incompatible. It is<br>
> better to ignore this combination.<br>
<br>
</span>As long as you are strictly using the clang/gcc driver, only one of<br>
{-shared, pie} will happen. But people like to hand all kinds of random<br>
junk via -Wl to detecting illogical combinations makes sense, especially<br>
when it is almost free. As written by George, -shared does not imply<br>
-pie.<br></blockquote><div><br></div><div>Also, unless we guarantee certain behavior for `-shared -pie`, IMO the best thing is to have a fatal error so that users don't depend on whatever we happen to do with that set of options if we aren't intentionally doing something specific.</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Joerg<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>