mgorny wrote: > It should only be invoking `nvptx-arch` if the user passed `-march=native`.
Sorry, didn't notice this sentence. Well, *I am* building with `-march=native` here — after all, other files are built for a CPU. If I change it to, say, `-march=zen2`, then it indeed compiles, with a lot of warnings: ``` 'zen2' is not a recognized processor for this target (ignoring processor) 'zen2' is not a recognized processor for this target (ignoring processor) 'zen2' is not a recognized processor for this target (ignoring processor) 'zen2' is not a recognized processor for this target (ignoring processor) 'zen2' is not a recognized processor for this target (ignoring processor) 'zen2' is not a recognized processor for this target (ignoring processor) ``` To be honest, this only proves my point — you shouldn't be invoking `CMAKE_CXX_COMPILER` when you're building for a GPU, since it's a compiler configured to be building for the host CPU. https://github.com/llvm/llvm-project/pull/126143 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits