Commit b6a0dbee authored by Christian Kandeler's avatar Christian Kandeler

CppTools: Make CompilerOptionsBuilder hide intrinsics.

Change-Id: I8b677fc82672ca5fd36bae18480467ef95201dcc
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent 773b41ff
...@@ -510,9 +510,17 @@ QStringList CompilerOptionsBuilder::createDefineOptions(const QByteArray &define ...@@ -510,9 +510,17 @@ QStringList CompilerOptionsBuilder::createDefineOptions(const QByteArray &define
bool toolchainDefines, bool toolchainDefines,
const QString &toolchainType) const QString &toolchainType)
{ {
QByteArray extendedDefines = defines;
QStringList result; QStringList result;
foreach (QByteArray def, defines.split('\n')) { // In gcc headers, lots of built-ins are referenced that clang does not understand.
// Therefore, prevent the inclusion of the header that references them. Of course, this
// will break if code actually requires stuff from there, but that should be the less common
// case.
if (toolchainType == QLatin1String("mingw") || toolchainType == QLatin1String("gcc"))
extendedDefines += "#define _X86INTRIN_H_INCLUDED\n";
foreach (QByteArray def, extendedDefines.split('\n')) {
if (def.isEmpty()) if (def.isEmpty())
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment