forked from qt-creator/qt-creator
WebAssembly: Always use system environment to run em++ -dumpversion
On Windows, we would start with a clean environment just with the emsdk environment added in order to run "em++.bat -dumpversion". That fails for some emsdk versions for reasons unknown. Let's reduce OS- specific special casing and instead use the system environment as basis everywhere. Change-Id: I143fe6193528390e17ee0a62936ad03d2c5a109e Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -104,10 +104,7 @@ QVersionNumber WebAssemblyEmSdk::version(const FilePath &sdkRoot)
|
||||
return {};
|
||||
const QString cacheKey = sdkRoot.toString();
|
||||
if (!emSdkVersionCache()->contains(cacheKey)) {
|
||||
Environment env;
|
||||
// Non-Windows: Need python in path (not provided by emsdk), thus use systemEnvironment
|
||||
if (!HostOsInfo::isWindowsHost())
|
||||
env = Environment::systemEnvironment();
|
||||
Environment env = Environment::systemEnvironment();
|
||||
WebAssemblyEmSdk::addToEnvironment(sdkRoot, env);
|
||||
const QString scriptFile =
|
||||
QLatin1String("emcc") + QLatin1String(HostOsInfo::isWindowsHost() ? ".bat" : "");
|
||||
|
||||
Reference in New Issue
Block a user