forked from qt-creator/qt-creator
ClangStaticAnalyzer: Set target explicitly for gcc toolchains
The default target of clang.exe might be unfavorable since it depends on
e.g. the tool chain used to build clang.exe:
default target
clang build with msvc: i686-pc-windows-msvc
clang build with mingw: i686-pc-windows-gnu
The correct target is important since it not only has implications on
the built-in macros and include paths, but also on parsing options. For
example, the msvc target silently adds the following parsing options
-fms-extensions
-fms-compatibility
-fms-compatibility-version=17.00
-fdelayed-template-parsing
...as can be seen by the output of
$ clang.exe -### empty.cpp
Change-Id: Icd8aaf11016e59f37025cbf1c97da81511ff249b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -83,6 +83,7 @@ private:
|
||||
private:
|
||||
const CppTools::ProjectInfo m_projectInfo;
|
||||
const unsigned char m_wordWidth;
|
||||
QString m_targetTriple;
|
||||
|
||||
Utils::Environment m_environment;
|
||||
QString m_clangExecutable;
|
||||
|
||||
Reference in New Issue
Block a user