[cmake][shared-build] Add build dependency on libc++ from stdlib#90361
[cmake][shared-build] Add build dependency on libc++ from stdlib#90361Teemperor wants to merge 1 commit into
Conversation
When building in a shared build folder, the libc++ module needs to be available for building the C++ overlay in Swift. This patch just adds a dependency on runtimes (which builds libc++). When building with build-script in different folders, the target doesn't exist and this patch won't change existing behavior.
|
@swift-ci test |
|
Windows is unrelated, and some source kit tests failed that also seems unrelated. |
|
@swift-ci test macOS |
|
@swift-ci test windows |
| INSTALL_BINARY_SWIFTMODULE NON_DARWIN_ONLY | ||
| INSTALL_WITH_SHARED | ||
| DEPENDS libstdcxx-modulemap libcxxshim_modulemap CxxStdlib-apinotes) | ||
| DEPENDS libstdcxx-modulemap libcxxshim_modulemap CxxStdlib-apinotes ${_cxxstdlib_extra_deps}) |
There was a problem hiding this comment.
I was told that stdlib/ CMake changes should be accompanied by a Runtimes/ change also, perhaps @edymtt can counsel you on that.
|
@swift-ci test macOS |
egorzhdan
left a comment
There was a problem hiding this comment.
This doesn't look right – the CxxStdlib overlay is built against the libc++ from the system/SDK, not the just-built libc++. When building the Swift toolchain on macOS, the two versions of libc++ might be substantially different.
What are you trying to achieve?
|
@egorzhdan To give some context, this PR is part of a series that allows building LLVM/Swift/LLDB in one build folder (and without needing build-script). It seems our CMake code builds by default against the just-built libc++ and this was just declaring this dependency. If this really needs to build against the host libc++ then this fix is indeed wrong. |
|
Got it, great to see this work happening! With the current build, I'm pretty sure we use the libc++ from the SDK. Happy to take a closer look into this offline. |
When building in a shared build folder, the libc++ module needs to be available for building the C++ overlay in Swift. This patch just adds a dependency on runtimes (which builds libc++). When building with build-script in different folders, the target doesn't exist and this patch won't change existing behavior.