ProjectExplorer: Allow users to override the gcc target triple

... for the clang code model. Otherwise, it won't work with GCC
compilers for architectures clang does not know about.

Fixes: QTCREATORBUG-26913
Change-Id: I90115f2f562eae9922b90c500630ccf988542ca3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2022-01-20 16:53:55 +01:00
parent b85e2bc17b
commit 6cec0e2033
9 changed files with 91 additions and 3 deletions

View File

@@ -254,7 +254,7 @@ void CompilerOptionsBuilder::addWordWidth()
void CompilerOptionsBuilder::addTargetTriple()
{
const QString target = m_explicitTarget.isEmpty()
const QString target = m_explicitTarget.isEmpty() || m_projectPart.targetTripleIsAuthoritative
? m_projectPart.toolChainTargetTriple : m_explicitTarget;
// Only "--target=" style is accepted in both g++ and cl driver modes.