forked from qt-creator/qt-creator
CppTools: Ignore -f[no-]keep-inline-dllexport
Fixes: QTCREATORBUG-22452 Change-Id: Ic17e6331e92f23c31f4f7319257f2d09c66af8a4 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -709,6 +709,7 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
|||||||
qgetenv("QTC_CLANG_CMD_OPTIONS_BLACKLIST"))
|
qgetenv("QTC_CLANG_CMD_OPTIONS_BLACKLIST"))
|
||||||
.split(';', QString::SkipEmptyParts);
|
.split(';', QString::SkipEmptyParts);
|
||||||
|
|
||||||
|
const Core::Id &toolChain = m_projectPart.toolchainType;
|
||||||
bool containsDriverMode = false;
|
bool containsDriverMode = false;
|
||||||
bool skipNext = false;
|
bool skipNext = false;
|
||||||
for (const QString &option : m_projectPart.compilerFlags) {
|
for (const QString &option : m_projectPart.compilerFlags) {
|
||||||
@@ -720,6 +721,13 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
|||||||
if (userBlackList.contains(option))
|
if (userBlackList.contains(option))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// TODO: Make it possible that the clang binary/driver ignores unknown options,
|
||||||
|
// as it is done for libclang/clangd (not checking for OPT_UNKNOWN).
|
||||||
|
if (toolChain == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID) {
|
||||||
|
if (option == "-fkeep-inline-dllexport" || option == "-fno-keep-inline-dllexport")
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore warning flags as these interfere with our user-configured diagnostics.
|
// Ignore warning flags as these interfere with our user-configured diagnostics.
|
||||||
// Note that once "-w" is provided, no warnings will be emitted, even if "-Wall" follows.
|
// Note that once "-w" is provided, no warnings will be emitted, even if "-Wall" follows.
|
||||||
if (m_useBuildSystemWarnings == UseBuildSystemWarnings::No
|
if (m_useBuildSystemWarnings == UseBuildSystemWarnings::No
|
||||||
@@ -772,7 +780,6 @@ void CompilerOptionsBuilder::evaluateCompilerFlags()
|
|||||||
m_compilerFlags.flags.append(theOption);
|
m_compilerFlags.flags.append(theOption);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Core::Id &toolChain = m_projectPart.toolchainType;
|
|
||||||
if (!containsDriverMode
|
if (!containsDriverMode
|
||||||
&& (toolChain == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
|
&& (toolChain == ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID
|
||||||
|| toolChain == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID)) {
|
|| toolChain == ProjectExplorer::Constants::CLANG_CL_TOOLCHAIN_TYPEID)) {
|
||||||
|
Reference in New Issue
Block a user