forked from qt-creator/qt-creator
ProjectExplorer: Do not set GCC install dir during auto-detection
The accessor has lazy evaluation built in, so no need to set the value prematurely. This reduces the amount of calls to the gcc binary at initial start-up by a third, which corresponds to ~500 ms on my machine. Change-Id: I35fb290c5f3e7572a129e4fdb1e4c8b12e766ad1 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1177,9 +1177,6 @@ Toolchains GccToolChainFactory::autoDetectToolChain(const ToolChainDescription &
|
|||||||
const GccToolChain::DetectedAbisResult detectedAbis = guessGccAbi(localCompilerPath,
|
const GccToolChain::DetectedAbisResult detectedAbis = guessGccAbi(localCompilerPath,
|
||||||
systemEnvironment,
|
systemEnvironment,
|
||||||
macros);
|
macros);
|
||||||
const Utils::FilePath installDir = gccInstallDir(localCompilerPath,
|
|
||||||
systemEnvironment);
|
|
||||||
|
|
||||||
for (const Abi &abi : detectedAbis.supportedAbis) {
|
for (const Abi &abi : detectedAbis.supportedAbis) {
|
||||||
std::unique_ptr<GccToolChain> tc(dynamic_cast<GccToolChain *>(create()));
|
std::unique_ptr<GccToolChain> tc(dynamic_cast<GccToolChain *>(create()));
|
||||||
if (!tc)
|
if (!tc)
|
||||||
@@ -1195,7 +1192,6 @@ Toolchains GccToolChainFactory::autoDetectToolChain(const ToolChainDescription &
|
|||||||
tc->setSupportedAbis(detectedAbis.supportedAbis);
|
tc->setSupportedAbis(detectedAbis.supportedAbis);
|
||||||
tc->setTargetAbi(abi);
|
tc->setTargetAbi(abi);
|
||||||
tc->setOriginalTargetTriple(detectedAbis.originalTargetTriple);
|
tc->setOriginalTargetTriple(detectedAbis.originalTargetTriple);
|
||||||
tc->setInstallDir(installDir);
|
|
||||||
tc->setDisplayName(tc->defaultDisplayName()); // reset displayname
|
tc->setDisplayName(tc->defaultDisplayName()); // reset displayname
|
||||||
if (!checker || checker(tc.get()))
|
if (!checker || checker(tc.get()))
|
||||||
result.append(tc.release());
|
result.append(tc.release());
|
||||||
|
Reference in New Issue
Block a user