[llvm] [MC] Add support for -mcpu=native. (PR #159414)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 14:43:43 PDT 2025


s-barannikov wrote:

I started seeing this error on a downstream CI:

```
# executed command: <...>/build/bin/FileCheck --allow-empty <...>/llvm/test/MC/AsmParser/native.s
# .---command stderr------------
# | <...>/llvm/test/MC/AsmParser/native.s:4:14: error: CHECK-NOT: excluded string found in input
# | # CHECK-NOT: {{.+}}
# |              ^
# | <stdin>:1:1: note: found here
# | 'cascadelake' is not a recognized processor for this target (ignoring processor)
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 
```

My downstream target is not X86, so -mcpu=native can't work.
#159838 doesn't help with the issue since the CI is run on X86 Linux machine.
I have LLVM_DEFAULT_TARGET_TRIPLE set to my target triple, if that matters.


https://github.com/llvm/llvm-project/pull/159414


More information about the llvm-commits mailing list