<div dir="ltr"><div>You'll be a lot better off if you use the gcc-style flags that clang accepts. If you bypass clang, it will generate LLVM IR for the default target, and then attempt to compile that IR using the triple you provided to llc.<br></div><div><br></div><div>Try 'clang --target=x86_64-linux-gnu' or whatever your target is.</div><div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 13, 2014 at 12:48 PM, Ziqiang Patrick Huang <span dir="ltr"><<a href="mailto:ziqiang.huang1001@gmail.com" target="_blank">ziqiang.huang1001@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>Is there a way to passing llc options to clang, for example -march -mcpu, etc. ? </div><div><br></div><div>Some threads suggested using -mllvm flag,</div><div><br></div><div>I tried ./clang -mllvm -march=X86-64 -mcpu=core2 -o hello hello.c, but got "Unknown command line argument"</div><div><br></div><div>Thanks,</div><div>Ziqiang </div><div><br clear="all"><div><br></div><br><div dir="ltr"><div><b></b></div></div></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div></div>