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

Cameron McInally via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 15:05:23 PDT 2025


mcinally wrote:

> 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 and both my target and X86 in LLVM_TARGETS_TO_BUILD, if that matters.

Please help me understand what you're seeing. So you're cross-compiling for your target on a `cascade lake` Linux machine?

Could we check `TripleName != sys::getDefaultTargetTriple()` to determine if this is a cross-compile? Would that solve your problem?


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


More information about the llvm-commits mailing list