<div dir="ltr">Don't know of any quick way to do that in LLVM - I guess companies/folks who do this go into the source code in Clang's driver and mess with it.<br><br>- Dave<br><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 10:10 PM Alexander Biddulph via cfe-users <<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_-7036879151939857043divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I am trying to compile clang/llvm to target a specific CPU architecture (Intel Broadwell for instance). The intention here is that every time this specific compiler is run it will only ever generate code for that specific
 CPU.<br>
<br>
To achieve this I would like to "bake-in" some command line arguments into the built compiler (things like -march), but still allow the user to provide extra command line arguments that may override the "baked-in" defaults.<br>
<br>
GCC provides a spec file to achieve this, but I can't find something equivalent for clang/llvm. Does such a thing exist for clang/llvm?</p>
</div>
</div>

_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org" target="_blank">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
</blockquote></div></div>