diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2016-04-08 14:19:23 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2016-04-11 10:16:34 +0000 |
commit | 276f4c489ca00ee09f83f4103cb8c3c60877df1b (patch) | |
tree | 016eedd64fc832d0d85952ba31f6b59a43816217 /src/plugins/cpptools/compileroptionsbuilder.cpp | |
parent | 0235412b34e90909a3a122915747e0b996021c7e (diff) | |
download | qt-creator-276f4c489ca00ee09f83f4103cb8c3c60877df1b.tar.gz |
Clang: Explicitly set the target triple
As for the analyzer, this makes us independent of the default triple and will
most likely reduce the maintenance - e.g. the target implies certain internal
command line arguments, we will profit from added ones.
This fixes parsing of mingw headers with the clang code model.
Change-Id: I722b981125a80fac5f62a7af40a83ecdd7bbf811
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r-- | src/plugins/cpptools/compileroptionsbuilder.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index c484e2b185..b520babef1 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -61,6 +61,14 @@ void CompilerOptionsBuilder::addDefine(const QByteArray &defineLine) m_options.append(defineLineToDefineOption(defineLine)); } +void CompilerOptionsBuilder::addTargetTriple() +{ + if (!m_projectPart.targetTriple.isEmpty()) { + m_options.append(QLatin1String("-target")); + m_options.append(m_projectPart.targetTriple); + } +} + void CompilerOptionsBuilder::addHeaderPathOptions() { typedef ProjectPartHeaderPath HeaderPath; |