CompilationDbProjectManager: Do not remove -fpic from command lines

This flag is needed by the code model. The test case that had it on the
command line was invalid (clang does not allow -fPIC with win32
targets).

Fixes: QTCREATORBUG-24106
Change-Id: Ic95c82c2090ef5ee1a11d01d7e4387a5c80cda3c
Reviewed-by: Nikolai Kosjar <pinaceae.pinus@gmail.com>
This commit is contained in:
Christian Kandeler
2020-05-29 12:16:48 +02:00
parent 4a6aa35a91
commit be97943372
2 changed files with 2 additions and 5 deletions

View File

@@ -150,9 +150,7 @@ void filteredFlags(const QString &fileName,
}
if (flag == "-o" || flag == "-MF" || flag == "-c" || flag == "-pedantic"
|| flag.startsWith("-O") || flag.startsWith("-W") || flag.startsWith("-w")
|| QString::compare(flag, "-fpic", Qt::CaseInsensitive) == 0
|| QString::compare(flag, "-fpie", Qt::CaseInsensitive) == 0) {
|| flag.startsWith("-O") || flag.startsWith("-W") || flag.startsWith("-w")) {
continue;
}

View File

@@ -33,7 +33,6 @@
"-DQT_CONCURRENT_LIB",
"-DQT_NETWORK_LIB",
"-DQT_CORE_LIB",
"-fPIC",
"-I",
"C:\\Qt\\5.9.2\\mingw53_32\\include",
"-I",
@@ -59,4 +58,4 @@
"directory": "C:/build-qtcreator-MinGW_32bit-Debug",
"file": "C:/qt-creator/src/plugins/cpptools/compileroptionsbuilder.cpp"
}
]
]