From b85e2bc17bab83b8fd3cd94c034e857b97def7ea Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 21 Jan 2022 16:50:25 +0100 Subject: [PATCH] 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 --- src/plugins/projectexplorer/gcctoolchain.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index a983b14f1d8..31ae2f6819b 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1177,9 +1177,6 @@ Toolchains GccToolChainFactory::autoDetectToolChain(const ToolChainDescription & const GccToolChain::DetectedAbisResult detectedAbis = guessGccAbi(localCompilerPath, systemEnvironment, macros); - const Utils::FilePath installDir = gccInstallDir(localCompilerPath, - systemEnvironment); - for (const Abi &abi : detectedAbis.supportedAbis) { std::unique_ptr tc(dynamic_cast(create())); if (!tc) @@ -1195,7 +1192,6 @@ Toolchains GccToolChainFactory::autoDetectToolChain(const ToolChainDescription & tc->setSupportedAbis(detectedAbis.supportedAbis); tc->setTargetAbi(abi); tc->setOriginalTargetTriple(detectedAbis.originalTargetTriple); - tc->setInstallDir(installDir); tc->setDisplayName(tc->defaultDisplayName()); // reset displayname if (!checker || checker(tc.get())) result.append(tc.release());