forked from qt-creator/qt-creator
C++ support: Consider project-specific target triple
... before creating project parts.
Otherwise we can get wrong includes and defines from the compiler.
Amends 9c86e6746f.
Also do not add -m32 or -m64 for non-x86 targets.
Task-number: QTCREATORBUG-25615
Change-Id: I02da9251c77d45fc8827990a2d59c3ae2c262591
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -78,9 +78,8 @@ static QStringList projectPartArguments(const ProjectPart &projectPart)
|
||||
args << "-c";
|
||||
if (projectPart.toolchainType != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) {
|
||||
args << "--target=" + projectPart.toolChainTargetTriple;
|
||||
args << (projectPart.toolChainWordWidth == ProjectPart::WordWidth64Bit
|
||||
? QLatin1String("-m64")
|
||||
: QLatin1String("-m32"));
|
||||
if (projectPart.toolChainAbi.architecture() == Abi::X86Architecture)
|
||||
args << QLatin1String(projectPart.toolChainAbi.wordWidth() == 64 ? "-m64" : "-m32");
|
||||
}
|
||||
args << projectPart.compilerFlags;
|
||||
for (const ProjectExplorer::HeaderPath &headerPath : projectPart.headerPaths) {
|
||||
|
||||
Reference in New Issue
Block a user