QtSupport: Collect environment changes instead of full environments

Starting creating custom qmakeRunEnvironment() with systemEnvironment
in derived classes without further context breaks down in cases of e.g.
containerized builds.

So instead create the base environment outside where the context is
clear (still wrong after this patch) and let the derived class only
apply the changes they need to an otherwise unspecified environment.

Change-Id: Ibb23844f490ce86d8a89f6ce728faff65865c09b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-05-25 15:54:12 +02:00
parent 79f01c101a
commit 128359af41
6 changed files with 18 additions and 12 deletions

View File

@@ -145,12 +145,10 @@ void AndroidQtVersion::addToEnvironment(const Kit *k, Utils::Environment &env) c
config.bestNdkPlatformMatch(qMax(minimumNDK(), AndroidManager::minimumSDK(k)), this));
}
Utils::Environment AndroidQtVersion::qmakeRunEnvironment() const
void AndroidQtVersion::setupQmakeRunEnvironment(Utils::Environment &env) const
{
Utils::Environment env = Utils::Environment::systemEnvironment();
env.set(QLatin1String("ANDROID_NDK_ROOT"),
AndroidConfigurations::currentConfig().ndkLocation(this).toUserOutput());
return env;
}
QString AndroidQtVersion::description() const