forked from qt-creator/qt-creator
Clang: Use toolchain macros for IAR toolchain
...or if requested with QTC_CLANG_USE_TOOLCHAIN_MACROS=1. Change-Id: I6d2f35b69393a7039271cc651aa514cdb686522e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -28,6 +28,8 @@
|
|||||||
#include "cppmodelmanager.h"
|
#include "cppmodelmanager.h"
|
||||||
#include "headerpathfilter.h"
|
#include "headerpathfilter.h"
|
||||||
|
|
||||||
|
#include <baremetal/baremetalconstants.h>
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <projectexplorer/headerpath.h>
|
#include <projectexplorer/headerpath.h>
|
||||||
@@ -352,6 +354,11 @@ void CompilerOptionsBuilder::addPrecompiledHeaderOptions(UsePrecompiledHeaders u
|
|||||||
|
|
||||||
void CompilerOptionsBuilder::addProjectMacros()
|
void CompilerOptionsBuilder::addProjectMacros()
|
||||||
{
|
{
|
||||||
|
static const int useMacros = qEnvironmentVariableIntValue("QTC_CLANG_USE_TOOLCHAIN_MACROS");
|
||||||
|
|
||||||
|
if (m_projectPart.toolchainType == BareMetal::Constants::IAREW_TOOLCHAIN_TYPEID || useMacros)
|
||||||
|
addMacros(m_projectPart.toolChainMacros);
|
||||||
|
|
||||||
addMacros(m_projectPart.projectMacros);
|
addMacros(m_projectPart.projectMacros);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user