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);
|
return ToolChain::includedFiles("-include", flags, directoryPath, PossiblyConcatenatedFlag::No);
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList GccToolChain::gccPrepareArguments(const QStringList &flags,
|
static QStringList gccPrepareArguments(const QStringList &flags,
|
||||||
const FilePath &sysRoot,
|
const FilePath &sysRoot,
|
||||||
const QStringList &platformCodeGenFlags,
|
const QStringList &platformCodeGenFlags,
|
||||||
Id languageId,
|
Id languageId)
|
||||||
OptionsReinterpreter reinterpretOptions)
|
|
||||||
{
|
{
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
const bool hasKitSysroot = !sysRoot.isEmpty();
|
const bool hasKitSysroot = !sysRoot.isEmpty();
|
||||||
@@ -677,7 +676,6 @@ QStringList GccToolChain::gccPrepareArguments(const QStringList &flags,
|
|||||||
allFlags << platformCodeGenFlags << flags;
|
allFlags << platformCodeGenFlags << flags;
|
||||||
arguments += filteredFlags(allFlags, !hasKitSysroot);
|
arguments += filteredFlags(allFlags, !hasKitSysroot);
|
||||||
arguments << languageOption(languageId) << "-E" << "-v" << "-";
|
arguments << languageOption(languageId) << "-E" << "-v" << "-";
|
||||||
arguments = reinterpretOptions(arguments);
|
|
||||||
|
|
||||||
return arguments;
|
return arguments;
|
||||||
}
|
}
|
||||||
@@ -702,8 +700,8 @@ HeaderPaths GccToolChain::builtInHeaderPaths(const Environment &env,
|
|||||||
QStringList arguments = gccPrepareArguments(flags,
|
QStringList arguments = gccPrepareArguments(flags,
|
||||||
sysRoot,
|
sysRoot,
|
||||||
platformCodeGenFlags,
|
platformCodeGenFlags,
|
||||||
languageId,
|
languageId);
|
||||||
reinterpretOptions);
|
arguments = reinterpretOptions(arguments);
|
||||||
|
|
||||||
// Must be clang case only.
|
// Must be clang case only.
|
||||||
if (!originalTargetTriple.isEmpty())
|
if (!originalTargetTriple.isEmpty())
|
||||||
|
|||||||
@@ -146,11 +146,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void syncAutodetectedWithParentToolchains();
|
void syncAutodetectedWithParentToolchains();
|
||||||
void updateSupportedAbis() const;
|
void updateSupportedAbis() const;
|
||||||
static QStringList gccPrepareArguments(const QStringList &flags,
|
|
||||||
const Utils::FilePath &sysRoot,
|
|
||||||
const QStringList &platformCodeGenFlags,
|
|
||||||
Utils::Id languageId,
|
|
||||||
OptionsReinterpreter reinterpretOptions);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QStringList m_platformCodeGenFlags;
|
QStringList m_platformCodeGenFlags;
|
||||||
|
|||||||
Reference in New Issue
Block a user