Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions documentation/cxx-interop/status/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,20 @@ code for a specific deployment platform:
| **Ubuntu, CentOS, Amazon Linux** | libstdc++ |
| **Windows** | Microsoft C++ Standard Library (msvcprt) |

Swift also supports selecting libc++ when building on certain Linux
distributions by passing `-Xcc -stdlib=libc++` flags. On those distributions,
libc++ needs to be installed from a system package manager, e.g. apt or yum.
This compatibility matrix shows the versions of libc++ that are supported by
Swift when building for various Linux versions:

| Linux version running Swift application | Supported libc++ package |
|-----------------------------------------|--------------------------|
| Ubuntu 22.04 | libc++-15-dev |
| Ubuntu 24.04 | libc++-18-dev |

Swift does not currently support selecting an alternative standard library for
platforms that support alternative standard libraries. For example, you can't use
libc++ when building Swift code for Ubuntu, even though libc++ can be used when
building C++ code for Ubuntu.
other platforms. For example, you can't use libc++ when building Swift code for
Windows, even though libc++ can be used when building C++ code for Windows.

Mixed Swift and C++ code must use
the same C++ standard library.
Expand Down