<div dir="ltr">So, I vaguely don't like this....<div><br></div><div>I'm pretty comfortable with 'clang -O3 x.o y.o z.o -o my_binary' passing O3 to the LTO plugin, but less comfortable with passing it to the linker itself. I'm not really sure why though, so I'm open to be convinced otherwise. I don't have any principled stance here, it just seems somewhat off.</div><div><br></div><div>I asked Rafael on IRC to check with GCC, and it requires "-Wl,-O3", and so my current vote is for us to not invent a new convenience thing here. I'd be interested if others disagree, and if so why.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 20, 2014 at 9:35 AM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is fairly common for -O to be passed to clang when linking and both<br>
bfd and gold support -O options, but currently the driver doesn't<br>
translate it and projects have to use -Wl,-O if they want to enable<br>
those options. In fact, our own build pass -O3, but not -Wl,-O.<br>
<br>
The attached patch translates and forwards the -O options to the linker.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>