diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-01-30 18:30:08 +0100 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-02-03 15:19:18 +0000 |
commit | b6a0dbeec7e1022ae3c371a656a39249578561ac (patch) | |
tree | db388c49216a7cf3fc033e5a8bc707fe903d0200 /src/plugins/cpptools/cppprojects.cpp | |
parent | 773b41ff6178f290f4b90f1018c7da13e17b8ea0 (diff) | |
download | qt-creator-b6a0dbeec7e1022ae3c371a656a39249578561ac.tar.gz |
CppTools: Make CompilerOptionsBuilder hide intrinsics.
Change-Id: I8b677fc82672ca5fd36bae18480467ef95201dcc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/cppprojects.cpp')
-rw-r--r-- | src/plugins/cpptools/cppprojects.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppprojects.cpp b/src/plugins/cpptools/cppprojects.cpp index 9e088288a8..bf1b532a94 100644 --- a/src/plugins/cpptools/cppprojects.cpp +++ b/src/plugins/cpptools/cppprojects.cpp @@ -510,9 +510,17 @@ QStringList CompilerOptionsBuilder::createDefineOptions(const QByteArray &define bool toolchainDefines, const QString &toolchainType) { + QByteArray extendedDefines = defines; 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()) continue; |