forked from qt-creator/qt-creator
ProjectExplorer: only use local files for size comparison
Change-Id: Ifbf218d4e459462ec6a115e69a5f3688642fddda Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1194,10 +1194,16 @@ Toolchains GccToolChainFactory::autoDetectToolchains(
|
|||||||
|| compilerPath.toString().contains("ccache")) {
|
|| compilerPath.toString().contains("ccache")) {
|
||||||
existingTcMatches = existingCommand == compilerPath;
|
existingTcMatches = existingCommand == compilerPath;
|
||||||
} else {
|
} else {
|
||||||
existingTcMatches = Environment::systemEnvironment().isSameExecutable(
|
existingTcMatches = Environment::systemEnvironment()
|
||||||
existingCommand.toString(), compilerPath.toString())
|
.isSameExecutable(existingCommand.toString(),
|
||||||
|| (HostOsInfo::isWindowsHost() && existingCommand.toFileInfo().size()
|
compilerPath.toString());
|
||||||
== compilerPath.toFileInfo().size());
|
if (!existingTcMatches
|
||||||
|
&& HostOsInfo::isWindowsHost()
|
||||||
|
&& !existingCommand.needsDevice()
|
||||||
|
&& !compilerPath.needsDevice()) {
|
||||||
|
existingTcMatches = existingCommand.toFileInfo().size()
|
||||||
|
== compilerPath.toFileInfo().size();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (existingTcMatches) {
|
if (existingTcMatches) {
|
||||||
if (existingTc->typeId() == requiredTypeId && (!checker || checker(existingTc))
|
if (existingTc->typeId() == requiredTypeId && (!checker || checker(existingTc))
|
||||||
|
Reference in New Issue
Block a user