Find SDK path more lazily in Apple Simulator platforms
authorJason Molenda <jason@molenda.com>
Mon, 13 Feb 2023 23:11:46 +0000 (15:11 -0800)
committerJason Molenda <jason@molenda.com>
Mon, 13 Feb 2023 23:16:41 +0000 (15:16 -0800)
commitee88f11770032eac8998664e7102d37f54b9f027
tree1ce91e37a8029a2ea9a71da7b977f633035624b4
parentf7016f8a8ea296f980dd38e0bcb4201353ec5430
Find SDK path more lazily in Apple Simulator platforms

In https://reviews.llvm.org/D122373 I delayed the search for
the SDK filepath until the simulator platform is Created.
In the qProcessInfo binary-addresses key, I have to force-Create
every platform to find one that can handle a kernel fileset;
this forced all of the simulator platforms to create, taking the
SDK filepath discovery perf hit.

This patch delays that path search further until the Apple
Simulator platform calls a method that actually needs the full
filepath; it saves the SDK name ("WatchSimulator.sdk" etc) until
it needs to expand it.

Differential Revision: https://reviews.llvm.org/D143932
rdar://103380717
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.h