Merge remote-tracking branch 'origin/4.11'

Change-Id: I0657cee6b87eea7b3178548bebed85d5ac824519
This commit is contained in:
Eike Ziller
2020-01-03 08:57:33 +01:00
11 changed files with 67 additions and 16 deletions

View File

@@ -138,6 +138,7 @@ QStringList CompilerOptionsBuilder::build(ProjectFile::Kind fileKind,
addTargetTriple();
updateFileLanguage(fileKind);
addLanguageVersionAndExtensions();
enableExceptions();
addPrecompiledHeaderOptions(usePrecompiledHeaders);
addProjectConfigFileInclude();
@@ -272,6 +273,17 @@ void CompilerOptionsBuilder::addCompilerFlags()
add(m_compilerFlags.flags);
}
void CompilerOptionsBuilder::enableExceptions()
{
// With "--driver-mode=cl" exceptions are disabled (clang 8).
// This is most likely due to incomplete exception support of clang.
// However, as we need exception support only in the frontend,
// enabling them explicitly should be fine.
if (m_projectPart.languageVersion > ::Utils::LanguageVersion::LatestC)
add("-fcxx-exceptions");
add("-fexceptions");
}
static QString creatorResourcePath()
{
#ifndef UNIT_TESTS