[clang] [Offload] Treat an empty packager archicture as 'generic' (PR #126655)

Michael Kruse via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 11 01:26:24 PST 2025


================
@@ -474,7 +474,7 @@ Expected<StringRef> clang(ArrayRef<StringRef> InputFiles, const ArgList &Args) {
 
   const llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ));
   StringRef Arch = Args.getLastArgValue(OPT_arch_EQ);
-  if (Arch.empty())
+  if (Arch.empty() || Arch == "generic")
----------------
Meinersbur wrote:

"generic" does not have the same meaning as "native"

> ‘native’
>    This selects the CPU to generate code for at compilation time by determining the processor type of the compiling machine
>
> ‘generic’
>     Produce code optimized for the most common IA32/AMD64/EM64T processors. There is no -march=generic option because -march indicates the instruction set the compiler can use, and there is no generic instruction set applicable to all processors.

https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html




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


More information about the cfe-commits mailing list