ProjectExplorer: Split Kit::*environment into build and run

They may differ in a containerized setup.

Change-Id: Ib7e60fdd69f56e8e22bad3dfbc246e7de2fe9cd4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2021-05-25 16:44:20 +02:00
parent 4786b03594
commit 015204a7c3
17 changed files with 66 additions and 34 deletions

View File

@@ -1287,8 +1287,7 @@ ProjectPart::Ptr CppModelManager::fallbackProjectPart()
Utils::FilePath sysroot = SysRootKitAspect::sysRoot(defaultKit);
if (sysroot.isEmpty())
sysroot = Utils::FilePath::fromString(defaultTc->sysRoot());
Utils::Environment env = Utils::Environment::systemEnvironment();
defaultKit->addToEnvironment(env);
Utils::Environment env = defaultKit->buildEnvironment();
ToolChainInfo tcInfo(defaultTc, sysroot.toString(), env);
part->setupToolchainProperties(tcInfo, {});
if (part->language == Language::C)