FreeBSD: Autolink C++ runtime

This hooks up the autolink mechanism to link the C++ runtime when C++
interop is enabled on FreeBSD.
This commit is contained in:
Evan Wilde
2025-06-18 16:15:03 -07:00
parent 3376785630
commit 91aa7b88f5
2 changed files with 4 additions and 2 deletions

View File

@@ -573,7 +573,8 @@ void swift::dependencies::registerCxxInteropLibraries(
return mainModuleName == Name;
})) {
// Only link with CxxStdlib on platforms where the overlay is available.
if (Target.isOSDarwin() || Target.isOSLinux() || Target.isOSWindows())
if (Target.isOSDarwin() || Target.isOSLinux() || Target.isOSWindows() ||
Target.isOSFreeBSD())
RegistrationCallback(LinkLibrary{"swiftCxxStdlib", LibraryKind::Library,
hasStaticCxxStdlib});
}