forked from qt-creator/qt-creator
Revert "Clang: Stop enabling exceptions explicitly"
This reverts commit b114f77d8a as
"--driver-mode=cl" apparently still disables exceptions.
Task-number: QTCREATORBUG-23000
Change-Id: I9c49d971fafda5e1aca8445f8921e50f323d368f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -136,6 +136,7 @@ QStringList CompilerOptionsBuilder::build(ProjectFile::Kind fileKind,
|
||||
addTargetTriple();
|
||||
updateFileLanguage(fileKind);
|
||||
addLanguageVersionAndExtensions();
|
||||
enableExceptions();
|
||||
|
||||
addPrecompiledHeaderOptions(usePrecompiledHeaders);
|
||||
addProjectConfigFileInclude();
|
||||
@@ -270,6 +271,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