<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/89487>89487</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [feature request] Clang should be able to print the current CPU march name based on its detected features
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          yurivict
      </td>
    </tr>
</table>

<pre>
    Clang allows to specify the -march=xx option to compile for a specific type of CPU. When the user specifies -march=native - this is for the current CPU type.

Clang defines the set of CPU types (a complete list is printed by 'clang -mcpu=help').

But it would be very useful if clang would also be able to print the current CPU's march name.

Clang has the database of marches, names and feature flags, so only clang can convert the actual set of feature flags into the name.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kkFv4zgMhX-NfCESOHJcxwcf2gY572WxZ1miYi0UyStSaf3vF5YTtB0M5mIf9Pj4PpKKyF0D4iDaN9GeK5V5imlYcnJ3p7kao1mGd6_CFZT38YOAI9CM2tkFeELY3VTSk2jOn58QZ3YxrAodb7PzCDYmUA-908DLjBAtvP_19x7-mTAUi0yYnhqkL8eg2N0RdsCTI3BU3NYCnVPCwKtNsdyL-izq1-27hTVoXUAqckJ-NC1qAiFPqkT0yAjeEa_uc3KB0cC4gJCdLja7m56zaM4T-lnITsj-R6-3zOAYPmL2BkaEO6ZlxbHZg7OweWyvylNcJWr0uE6odPuVRsiOoOBDULffcU1qYzKK1aioTLMUIAn5XqoIVDBgUXFOCNara3miCDH45RFKqwA6hjumLYTSnJV_jupHMbjAsYi-ZarM0Ji-6VWFw6E7NO2p605tNQ3N2HR9P750rWys7ZWUvbaI5mRsNzaHtnKDrOWxPsq6PjYvst3jQfen3hjbWMSX3opjjTfl_N77-20f07VyRBmHU388dZVXI3oq5yplYRFSrpebhlW_G_OVxLFel0pfDuzYlxt_kiX8LyOxaM-wDZam5xL_uKFv24F1_gZiAMcEBhn1ej6PDlTl5IeJeSbRvAp5EfJydTzlca_jTcjLmu3x280p_ouahbwUVBLyUmj_DwAA__8rlTbG">