[utils][presets] Build libc++ for LLDB on linux
We pass -stdlib=libc++ in the test-suite to
Clang for many of our tests because we want to
explicilty test against libc++ type layouts.
However, if we don't do this against a newly built libc++ we risk testing against old/unexpected layouts or if libc++ isn't available on the system, falling back to the system libstdc++.
This patch adds libcxx as an explicit target in the preset so the tests build against a fresh libc++ (as we do for our other LLDB presets too).
Fixes the Ubuntu LLDB bots: https://ci.swift.org/view/LLDB/job/oss-lldb-linux-ubuntu-22_04/10806/execution/node/427/log/?consoleFull
@swift-ci test
@swift-ci test linux
Seems reasonable to me, I just wonder if we also need to test libstdc++. @egorzhdan Is the expectations that users of C++ interop on Linux are using libc++?
@egorzhdan It looks like the package bots (e.g., https://ci.swift.org/job/oss-swift-package-ubuntu-24_04/551/consoleText) are currently not building libc++. Should we change that?
@swift-ci test
Is the expectations that users of C++ interop on Linux are using libc++?
By default Swift code that uses C++ interop on Linux is still compiled with libstdc++, we provide substantially better support for libstdc++ in the Swift compiler, compared to libc++ on Linux. The ability to compile with libc++ on Linux is meant to unblock projects which have dependencies that can only be built with libc++.
It looks like the package bots (e.g., https://ci.swift.org/job/oss-swift-package-ubuntu-24_04/551/consoleText) are currently not building libc++. Should we change that?
I think it would be reasonable to build libc++ on Linux on the bots. I can see a lot of Building CXX object libcxx/src output in this build log, so it looks like some part of libc++ is being built. Perhaps it just isn't installed to the right path afterwards?