forked from qt-creator/qt-creator
ProjectExplorer: Simplify gcc options re-interpretation interface
Change-Id: I6fc293389e301d7ec36a897c856a0e2d57e35964 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -662,11 +662,10 @@ FilePaths GccToolChain::includedFiles(const QStringList &flags, const FilePath &
|
||||
return ToolChain::includedFiles("-include", flags, directoryPath, PossiblyConcatenatedFlag::No);
|
||||
}
|
||||
|
||||
QStringList GccToolChain::gccPrepareArguments(const QStringList &flags,
|
||||
static QStringList gccPrepareArguments(const QStringList &flags,
|
||||
const FilePath &sysRoot,
|
||||
const QStringList &platformCodeGenFlags,
|
||||
Id languageId,
|
||||
OptionsReinterpreter reinterpretOptions)
|
||||
Id languageId)
|
||||
{
|
||||
QStringList arguments;
|
||||
const bool hasKitSysroot = !sysRoot.isEmpty();
|
||||
@@ -677,7 +676,6 @@ QStringList GccToolChain::gccPrepareArguments(const QStringList &flags,
|
||||
allFlags << platformCodeGenFlags << flags;
|
||||
arguments += filteredFlags(allFlags, !hasKitSysroot);
|
||||
arguments << languageOption(languageId) << "-E" << "-v" << "-";
|
||||
arguments = reinterpretOptions(arguments);
|
||||
|
||||
return arguments;
|
||||
}
|
||||
@@ -702,8 +700,8 @@ HeaderPaths GccToolChain::builtInHeaderPaths(const Environment &env,
|
||||
QStringList arguments = gccPrepareArguments(flags,
|
||||
sysRoot,
|
||||
platformCodeGenFlags,
|
||||
languageId,
|
||||
reinterpretOptions);
|
||||
languageId);
|
||||
arguments = reinterpretOptions(arguments);
|
||||
|
||||
// Must be clang case only.
|
||||
if (!originalTargetTriple.isEmpty())
|
||||
|
||||
@@ -146,11 +146,6 @@ protected:
|
||||
private:
|
||||
void syncAutodetectedWithParentToolchains();
|
||||
void updateSupportedAbis() const;
|
||||
static QStringList gccPrepareArguments(const QStringList &flags,
|
||||
const Utils::FilePath &sysRoot,
|
||||
const QStringList &platformCodeGenFlags,
|
||||
Utils::Id languageId,
|
||||
OptionsReinterpreter reinterpretOptions);
|
||||
|
||||
protected:
|
||||
QStringList m_platformCodeGenFlags;
|
||||
|
||||
Reference in New Issue
Block a user