[all-commits] [llvm/llvm-project] ac29c3: [lldb/Platform] Skip very slow xcrun queries for s...

Vedant Kumar via All-commits all-commits at lists.llvm.org
Wed Mar 10 13:57:37 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ac29c35207a506eedaaea8a4196b83facbf978da
      https://github.com/llvm/llvm-project/commit/ac29c35207a506eedaaea8a4196b83facbf978da
  Author: Vedant Kumar <vsk at apple.com>
  Date:   2021-03-10 (Wed, 10 Mar 2021)

  Changed paths:
    M lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp

  Log Message:
  -----------
  [lldb/Platform] Skip very slow xcrun queries for simulator platforms, NFC

GetXcodeSDK() consistently takes over 1 second to complete if the
queried SDK is missing, because `xcrun` doesn't cache negative lookups.

Because there are multiple simulator platforms, this can add 4+ seconds
to `lldb -b some_object_file.o`.

To work around this, skip the call to GetXcodeSDK() when setting up
simulator platforms if the specified arch doesn't have what looks like a
simulator triple.

Some other ways to fix this:
- Fix caching in xcrun (rdar://74882205)
- Test for arch compat before calling SomePlatform::CreateInstance() (much
  larger change)

Differential Revision: https://reviews.llvm.org/D98272




More information about the All-commits mailing list