[all-commits] [llvm/llvm-project] 995157: Don't search for sim SDK path until we know we nee...

Jason Molenda via All-commits all-commits at lists.llvm.org
Thu Mar 24 15:45:12 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99515783a63cd5018fa9231872dc5c8b13d64947
      https://github.com/llvm/llvm-project/commit/99515783a63cd5018fa9231872dc5c8b13d64947
  Author: Jason Molenda <jason at molenda.com>
  Date:   2022-03-24 (Thu, 24 Mar 2022)

  Changed paths:
    M lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
    M lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
    M lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h

  Log Message:
  -----------
  Don't search for sim SDK path until we know we need it

When iterating over all Platforms looking for the best one, on a Mac the
Simulator platforms (iOS, tvOS, watchOS) will first find their SDK
directory by calling xcrun, then decide if they should activate or not.
When that SDK is absent, the call to xcrun to find it can be very slow.
This patch delays that directory search until we know we're activating
this platform, so non-simulator environments don't pay a perf cost ever
time they go through the list of platforms.

Differential Revision: https://reviews.llvm.org/D122373
rdar://87960090




More information about the All-commits mailing list