Wasm: Only detect toolchains from the emsdk installation device

Change-Id: I910365c6e02e714adf1a233b42df86110cf65a0a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
hjk
2021-07-12 13:04:00 +02:00
parent 86149d9299
commit cc1375baa1

View File

@@ -168,6 +168,13 @@ QList<ToolChain *> WebAssemblyToolChainFactory::autoDetect(
if (!WebAssemblyEmSdk::isValid(sdk))
return {};
if (device) {
// Only detect toolchains from the emsdk installation device
const FilePath deviceRoot = device->mapToGlobalPath({});
if (deviceRoot.host() != sdk.host())
return {};
}
Environment env = sdk.deviceEnvironment();
WebAssemblyEmSdk::addToEnvironment(sdk, env);