diff options
author | Eike Ziller <eike.ziller@qt.io> | 2020-11-30 16:14:32 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2020-11-30 16:14:32 +0100 |
commit | d02afbe6b4105fb43dc6c3f6171a7bedfa73c0a5 (patch) | |
tree | 109f41808dabd4c83b3cb519800cee0879dcf5f6 /src/plugins/projectexplorer/gcctoolchain.cpp | |
parent | 51fd8f5f70af58c79add15bb83d26b15d6e893a0 (diff) | |
parent | 43c73b20e48330f428aa9dba7e1fa37742354671 (diff) | |
download | qt-creator-d02afbe6b4105fb43dc6c3f6171a7bedfa73c0a5.tar.gz |
Merge remote-tracking branch 'origin/4.14'
Conflicts:
src/plugins/projectexplorer/gcctoolchain.cpp
Change-Id: I2136ba89d3aa3c4c2a0e7a4f9d8ba9cec32924ce
Diffstat (limited to 'src/plugins/projectexplorer/gcctoolchain.cpp')
-rw-r--r-- | src/plugins/projectexplorer/gcctoolchain.cpp | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index d9afd85462..052f4a5455 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -427,7 +427,16 @@ ToolChain::MacroInspectionRunner GccToolChain::createMacroInspectionRunner() con MacrosCache macroCache = predefinedMacrosCache(); Utils::Id lang = language(); - // This runner must be thread-safe! + /* + * Asks compiler for set of predefined macros + * flags are the compiler flags collected from project settings + * returns the list of defines, one per line, e.g. "#define __GXX_WEAK__ 1" + * Note: changing compiler flags sometimes changes macros set, e.g. -fopenmp + * adds _OPENMP macro, for full list of macro search by word "when" on this page: + * http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html + * + * This runner must be thread-safe! + */ return [env, compilerCommand = compilerCommand(), platformCodeGenFlags, reinterpretOptions, macroCache, lang] (const QStringList &flags) { @@ -459,20 +468,6 @@ ToolChain::MacroInspectionRunner GccToolChain::createMacroInspectionRunner() con } /** - * @brief Asks compiler for set of predefined macros - * @param cxxflags - compiler flags collected from project settings - * @return defines list, one per line, e.g. "#define __GXX_WEAK__ 1" - * - * @note changing compiler flags sometimes changes macros set, e.g. -fopenmp - * adds _OPENMP macro, for full list of macro search by word "when" on this page: - * http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html - */ -ProjectExplorer::Macros GccToolChain::predefinedMacros(const QStringList &cxxflags) const -{ - return createMacroInspectionRunner()(cxxflags).macros; -} - -/** * @brief Parses gcc flags -std=*, -fopenmp, -fms-extensions. * @see http://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html */ @@ -645,16 +640,6 @@ ToolChain::BuiltInHeaderPathsRunner GccToolChain::createBuiltInHeaderPathsRunner }; } -HeaderPaths GccToolChain::builtInHeaderPaths(const QStringList &flags, - const FilePath &sysRootPath, - const Environment &env) const -{ - return createBuiltInHeaderPathsRunner(env)(flags, - sysRootPath.isEmpty() ? sysRoot() - : sysRootPath.toString(), - originalTargetTriple()); -} - void GccToolChain::addCommandPathToEnvironment(const FilePath &command, Environment &env) { const Utils::FilePath compilerDir = command.parentDir(); @@ -845,7 +830,7 @@ GccToolChain::DetectedAbisResult GccToolChain::detectSupportedAbis() const { Environment env = Environment::systemEnvironment(); addToEnvironment(env); - ProjectExplorer::Macros macros = predefinedMacros(QStringList()); + ProjectExplorer::Macros macros = createMacroInspectionRunner()({}).macros; return guessGccAbi(findLocalCompiler(compilerCommand(), env), env.toStringList(), macros, |