<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/149370>149370</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[ARM64] -march=native omits features detected by -mcpu=native
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
sh1boot
</td>
</tr>
</table>
<pre>
Tested on clang-19 on a WSL Ubuntu aarch64 host and native Linux Debian aarch64 host (clang-19.1.7):
```zsh
diff -u <(clang -xc /dev/null -E -dM -march=native) <(clang -xc /dev/null -E -dM -mcpu=native)
```
The feature defines for `-march=native` lack the crypto features which the host CPU does have, while the feature defines for `-mcpu=native` are complete (or at least better).
Unfortunately `-mcpu` is unsupported on x86, so this forces the use of two different command lines depending on the host architecture.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMk1tr3DwQhn-NfDPYyPJpfeGLfNlvrxIobUKvJWu8UquVjA6bbH99kTdpDlAoCGwYzbzPOzPiIeijRZxI9x_p9gVPUTk_BVUL52IhnLxMDxgiSnAWZsPtsazH_M_h-7c7eBTJxgSc-1n1LSgXInArwfKozwh32qZn2KPQ3H68RNjutVpVVwNhI2luCN1OT6_nV1CE3ki9LFAmIM3taxKUzzMQdpB4JuxgkzFQ_g-lvIfylEVIs78CEDb-a968pvdp7zmuWA8KYUEek0eQuGiLARbngfT0s2pPwfD5J0SFMPvLGt1rZoAnpWe1RbY-3H55BOkwgOJZ9zbHDW7xv4p9QO0pcI8wu9NqMGJurPPAIxjkIYLAGNETNlZXF492cT4myyOay1u5noIOkGxI6-r8y7ifd30mCg6i0pv-jGFDSwHBLRCfHOTxoEcbM8Ipz95stBJXtFLbY670x27uk444Z2NVIadGjs3IC5zqoWPD0LGGFmpqmt281E0ruo7h0ra96Ni4tHLc0d0ixrbQE6Oso0M91DtKG1q1w8DEgkMn6gYFY6SleOLaVMacT5Xzx0KHkHCq27EZaGG4QBO2pWfM4hNsUcJYfgN-ykmlSMdAWmp0iOGtTNTRbK_l5ut935Ju_3nlwJ10DG_zlpjtogRx-bRlRfJmUjGuIa8-OxB2OOqokqhmdyLskDVfPuXq3Q-cI2GHjTQQdnixcp7Y7wAAAP__KM42nA">