Jonas Devlieghere 460c0f567c
[lldb] Move two methods from Platfrom -> Host (NFC) (#132119)
This moves two functions from Platform to Host:

  1. GetCurrentXcodeToolchainDirectory
  2. GetCurrentCommandLineToolsDirectory.

These two functions caused a layering violation in the Swift fork, which
added a dependency from lldbHost to lldbPlatform. As show by this PR,
there's no need for these two functions to live in Platform, and we
already have similar functions in Host.

We have various layering violations but this one is particularly bad,
because lldb-dap started depending on lldbHost. On the Swift fork, this
library was depending on lldbPlatform which pulled in various Swift
files, which libLLDB needs, but lldb-dap itself does not. We were
missing RPATHs to resume them, so in the current nightly, lldb-dap
crashes because the dynamic loader can't find the missing Swift libs.

rdar://146537366
2025-03-19 22:22:01 -07:00
..