<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 6, 2015 at 11:10 AM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</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 6 November 2015 at 11:00, Phil Tomson <<a href="mailto:phil.a.tomson@gmail.com">phil.a.tomson@gmail.com</a>> wrote:<br>
> With 3.6 I get an unused argument warning with -enable-pie:<br>
><br>
> $ clang -v -emit-llvm -enable-pie -O0 -S global_dat.c -o<br>
> global_dat_x86_pie.ll<br>
<br>
</span>Yes, it's an llc option not a Clang option. It actually looks like<br>
Clang doesn't forward it to LLVM at all (almost certainly a bug, if<br>
so). But that's probably OK because the only place LLVM actually uses<br>
it at all is to determine what kind of TLS model to use<br>
(TargetMachine.cpp), which linkers can mostly relax anyway.<br></blockquote><div><br></div><div>In my case I'm actually working on a backend for a new architecture and need this to show up in LLVM because certain pseudo ops need to be expanded in a certain way if we're using PIE (vs. just a default static link). So are these options accessible in the Target-specific code?  <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
It does seem to get passed onto the linker by Clang though.<br></blockquote><div><br></div><div>Not sure how that can work.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div></div>