forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.11'
Change-Id: I0657cee6b87eea7b3178548bebed85d5ac824519
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user