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

    <tr>
        <th>Summary</th>
        <td>
            ld.lld: error: unknown argument '--fix-cortex-a53-835769' when trying to compile rust on aarch64
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld
      </td>
    </tr>

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

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

<pre>
    I'm encountering the error in the title when trying to compile `rust` with `lld` 20.1.8 as [packaged by Arch](https://gitlab.archlinux.org/archlinux/packaging/packages/lld/-/blob/main/PKGBUILD?ref_type=heads) on aarch64. I'm using `gcc` 15.2.1 compiled with `--enable-fix-cortex-a53-835769` and `--enable-fix-cortex-a53-843419` options.

The `--fix-cortex-a53-835769` flag seems to be getting injected at some point in rust's build process and there doesn't appear to be a straightforward way to override it nor the usage of `lld` instead of another linker that supports this flag.

Per https://lld.llvm.org/, `lld` is meant to be a drop-in replacement for GNU `ld`. Also it appears that the work to try to support the fix was actually [merged](https://github.com/llvm/llvm-project/commit/f2a801d8ac8c83f21ea50e1b23fb3f3496ab9ff2) quite some time ago. But perhaps the option was simply never added to `lld`?

Let me know if there is any other information I can provide. Thanks!
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVMGOpDYQ_Rr3pdQIDDRw4NCTEatRVtEeds9RgQtw2tjENt3Tfx_Z9HYmh4m0J1zYVX6v6vmhc3LSRC0rX1j5esDNz8a2vRtmTfLQG3Fv3xivFiA9mE17slJP4GcCstZYkDoGXnpFcJtJg7f3eMTAYJZVKgJ2Su3mPDulcJN-DrFSIoQ8TbKkBnTAypcVhwtOJKC_w9kOMytfGa9n71fH8jPjHePdJL3CPkE7zErq7T0xdmK8e8aMd3sZqafnmhzjXbiRd0fGu16ZnvFuQakZ7779_uXlx9vXV5Z3lsY__X0llr_OhMIx3o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