diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp --- a/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp @@ -530,6 +530,8 @@ } static PlatformSP CreateInstance(bool force, const ArchSpec *arch) { + if (arch && arch->IsValid() && !arch->TripleEnvironmentWasSpecified()) + return nullptr; // Avoid very slow xcrun query for non-simulator archs. llvm::StringRef sdk; sdk = HostInfo::GetXcodeSDKPath(XcodeSDK("iPhoneSimulator.Internal.sdk")); if (sdk.empty()) @@ -578,6 +580,8 @@ } static PlatformSP CreateInstance(bool force, const ArchSpec *arch) { + if (arch && arch->IsValid() && !arch->TripleEnvironmentWasSpecified()) + return nullptr; // Avoid very slow xcrun query for non-simulator archs. return PlatformAppleSimulator::CreateInstance( "PlatformAppleTVSimulator", g_tvos_description, ConstString(g_tvos_plugin_name), @@ -619,6 +623,8 @@ } static PlatformSP CreateInstance(bool force, const ArchSpec *arch) { + if (arch && arch->IsValid() && !arch->TripleEnvironmentWasSpecified()) + return nullptr; // Avoid very slow xcrun query for non-simulator archs. return PlatformAppleSimulator::CreateInstance( "PlatformAppleWatchSimulator", g_watchos_description, ConstString(g_watchos_plugin_name),