handle non-x86 64-bit targets

This commit is contained in:
Cyano Hao 2022-12-10 12:00:57 +08:00
parent 210eb8b6dc
commit 1983efdd2f
1 changed files with 4 additions and 6 deletions

View File

@ -2072,12 +2072,10 @@ void Settings::CompilerSet::setProperties(const QString &binDir, const QString&
int delimPos2 = delimPos1; int delimPos2 = delimPos1;
while (delimPos2<output.length() && !isNonPrintableAsciiChar(output[delimPos2])) while (delimPos2<output.length() && !isNonPrintableAsciiChar(output[delimPos2]))
delimPos2++; delimPos2++;
mTarget = output.mid(delimPos1,delimPos2-delimPos1); QString triplet = output.mid(delimPos1,delimPos2-delimPos1);
if (mTarget.contains("x86_64")) int tripletDelimPos1 = triplet.indexOf('-');
mTarget = "x86_64"; mTarget = triplet.mid(0, tripletDelimPos1);
else
mTarget = "i686";
//Find version number //Find version number
targetStr = "clang version "; targetStr = "clang version ";
@ -2660,7 +2658,7 @@ bool Settings::CompilerSets::addSets(const QString &folder, const QString& cc_pr
return false; return false;
QString baseName = baseSet->name(); QString baseName = baseSet->name();
QString platformName; QString platformName;
if (baseSet->target() == "x86_64") { if (baseSet->target().contains("64") || baseSet->target() == "s390x") {
if (baseName.startsWith("TDM-GCC ")) { if (baseName.startsWith("TDM-GCC ")) {
PCompilerSet set= addSet(baseSet); PCompilerSet set= addSet(baseSet);
platformName = "32-bit"; platformName = "32-bit";