Re:Interoperability Between Swift and C++
by humanrebar on Saturday October 17, 2020 @05:16PM
(#24813453)
If only having tools from the same toolchain guaranteed ABI compatibility worked! Something as apparently benign as using absl::string_view with different '-std=c++NN' flags in different otherwise unrelated C++ libraries is an ABI break.
The Swift compiler is in C++ targeting the LLVM and therefore with great interoperability with C and C++ through Clang.
The Swift compiler also ships with Clang, and you can link C and C++ projects that are dependencies of Swift packages using the Swift package manager with little effort.