Skip to content

Commit d311edd

Browse files
author
Chen Zheng
committed
[PowerPC] fix default cpu setting
for platform that returns nothing for getHostCPUName() For example for target ARM on windows. For this case, -mcpu=native should set CPU to the default according to triple instead of setting CPU to "native" Fixes https://lab.llvm.org/buildbot/#/builders/161/builds/873 caused by #97541
1 parent a79db96 commit d311edd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/TargetParser/PPCTargetParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ StringRef getNormalizedPPCTargetCPU(const Triple &T, StringRef CPUName) {
9797
}
9898

9999
StringRef CPU = normalizeCPUName(CPUName);
100-
if (CPU != "generic")
100+
if (CPU != "generic" && CPU != "native")
101101
return CPU;
102102
}
103103

0 commit comments

Comments
 (0)