Skip to content

Commit f412fdd

Browse files
Chen Zhengyuxuanchen1997
authored andcommitted
[PowerPC] fix default cpu setting
Summary: 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 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250515
1 parent 2e97c09 commit f412fdd

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)