forked from qt-creator/qt-creator
ProjectPart: save codegen flags in project part
And add them to other clang code model arguments. These flags provide architecture for cross-compilation when ios kit is selected. Task-number: QTCREATORBUG-19437 Task-number: QTCREATORBUG-19430 Change-Id: I7a485f49d637371bb28b2096086d7d8a4b0c404a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -52,6 +52,7 @@ QStringList CompilerOptionsBuilder::build(CppTools::ProjectFile::Kind fileKind,
|
||||
|
||||
addWordWidth();
|
||||
addTargetTriple();
|
||||
addExtraCodeModelFlags();
|
||||
addLanguageOption(fileKind);
|
||||
addOptionsForLanguage(/*checkForBorlandExtensions*/ true);
|
||||
enableExceptions();
|
||||
@@ -104,6 +105,14 @@ void CompilerOptionsBuilder::addTargetTriple()
|
||||
}
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::addExtraCodeModelFlags()
|
||||
{
|
||||
// extraCodeModelFlags keep build architecture for cross-compilation.
|
||||
// In case of iOS build target triple has aarch64 archtecture set which makes
|
||||
// code model fail with CXError_Failure. To fix that we explicitly provide architecture.
|
||||
m_options.append(m_projectPart.extraCodeModelFlags);
|
||||
}
|
||||
|
||||
void CompilerOptionsBuilder::enableExceptions()
|
||||
{
|
||||
add(QLatin1String("-fcxx-exceptions"));
|
||||
|
||||
Reference in New Issue
Block a user