<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It is my actual target architecture<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Doerfert, Johannes <jdoerfert@anl.gov><br>
<b>Sent:</b> Saturday, March 23, 2019 1:30 PM<br>
<b>To:</b> J S<br>
<b>Cc:</b> via llvm-dev<br>
<b>Subject:</b> Re: [llvm-dev] Generating object files more efficiently</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0">I copied "-march=XYZ" from your original email,</p>
<p style="margin-top:0; margin-bottom:0">you have to replace it with your actual target architecture or simply drop it.</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> J S <mm92126@hotmail.com><br>
<b>Sent:</b> Saturday, March 23, 2019 3:26:59 PM<br>
<b>To:</b> Doerfert, Johannes<br>
<b>Cc:</b> via llvm-dev<br>
<b>Subject:</b> Re: [llvm-dev] Generating object files more efficiently</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">Johannes,</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">I tried the last one and it gave me this:</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0"></p>
<div>error: unknown target CPU 'XYZ'<br>
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom,<br>
      silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7,<br>
      westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell,<br>
      core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake,<br>
      cannonlake, icelake-client, icelake-server, knl, knm, k8, athlon64,<br>
      athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10,<br>
      barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2,<br>
      x86-64</div>
<br>
<p></p>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Doerfert, Johannes <jdoerfert@anl.gov><br>
<b>Sent:</b> Saturday, March 23, 2019 1:15 PM<br>
<b>To:</b> J S<br>
<b>Cc:</b> via llvm-dev<br>
<b>Subject:</b> Re: [llvm-dev] Generating object files more efficiently</font>
<div> </div>
</div>
<div class="x_x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_x_PlainText">I would have guessed:<br>
<br>
object:<br>
clang -c foo.c -o foo.o -march=XYZ<br>
<br>
shared library:<br>
clang -shared foo.c -o foo.so -march=XYZ<br>
<br>
executable:<br>
clang foo.c -o foo -march=XYZ<br>
<br>
<br>
On 03/23, J S via llvm-dev wrote:<br>
> Currently I compile my C code in 2 steps in order to generate .o files<br>
> <br>
> clang -emit-llvm -c foo.c -o foo.bc<br>
> llc -march=XYZ foo.bc -filetype=obj<br>
> <br>
> Is there a way to generate either .o or .elf files in just 1 command?<br>
> <br>
> Thanks.<br>
> <br>
<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> llvm-dev@lists.llvm.org<br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" id="LPlnk441436" class="x_x_OWAAutoLink">
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
<div id="LPBorder_GT_15533727854030.6247321936370462" style="margin-bottom:20px; overflow:auto; width:100%; text-indent:0px">
<table id="LPContainer_15533727854010.8522819716881989" role="presentation" cellspacing="0" style="width:90%; background-color:rgb(255,255,255); overflow:auto; padding-top:20px; padding-bottom:20px; margin-top:20px; border-top:1px dotted rgb(200,200,200); border-bottom:1px dotted rgb(200,200,200)">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td id="x_x_TextCell_15533727854020.30525608518325453" colspan="2" style="vertical-align:top; padding:0px; display:table-cell">
<div id="LPRemovePreviewContainer_15533727854020.5780090391607132"></div>
<div id="LPTitle_15533727854020.6569217889933334" style="top:0px; color:rgb(0,120,215); font-weight:400; font-size:21px; font-family:"wf_segoe-ui_light","Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; line-height:21px">
<a id="LPUrlAnchor_15533727854020.316176065422607" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank" style="text-decoration:none">llvm-dev Info Page</a></div>
<div id="LPMetadata_15533727854030.04365073044475842" style="margin:10px 0px 16px; color:rgb(102,102,102); font-weight:400; font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size:14px; line-height:14px">
lists.llvm.org</div>
<div id="LPDescription_15533727854030.8051908586636592" style="display:block; color:rgb(102,102,102); font-weight:400; font-family:"wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size:14px; line-height:20px; max-height:100px; overflow:hidden">
To see the collection of prior postings to the list, visit the llvm-dev Archives.. Using llvm-dev: To post a message to all the list members, send email to llvm-dev@lists.llvm.org. You can subscribe to the list, or change your existing subscription, in the
 sections below.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
-- <br>
<br>
Johannes Doerfert<br>
Researcher<br>
<br>
Argonne National Laboratory<br>
Lemont, IL 60439, USA<br>
<br>
jdoerfert@anl.gov<br>
</div>
</span></font></div>
</div>
</div>
</div>
</div>
</body>
</html>