[llvm] ARM: Remove CPU from computeTargetABI (PR #151983)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 4 13:28:04 PDT 2025
https://github.com/efriedma-quic approved this pull request.
Various targets use the module-wide "target CPU" for various decisions, including adding attributes to the object file. Saying it "shouldn't" affect module-level decisions doesn't match reality.
-----
That said, in this particular case, the triple should be sufficient. clang canonicalizes the triple: if you try to pass in a triple with the wrong profile, it canonicalizes it to the right architecture. (For example, if you pass `--target=arm-none-eabi -mcpu=cortex-m0` to clang, it canonicalizes the triple to `thumbv6m-unknown-none-eabi`.) I think the CPU check is just an artifact of a bunch of refactoring (starting with 1971c3508a3e781104803d750496339460dfac1e), and shouldn't actually be necessary.
LGTM
https://github.com/llvm/llvm-project/pull/151983
More information about the llvm-commits
mailing list