File tree 1 file changed +13
-3
lines changed
documentation/cxx-interop/status
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,20 @@ code for a specific deployment platform:
79
79
| ** Ubuntu, CentOS, Amazon Linux** | libstdc++ |
80
80
| ** Windows** | Microsoft C++ Standard Library (msvcprt) |
81
81
82
+ Swift also supports selecting libc++ when building on certain Linux
83
+ distributions by passing ` -Xcc -stdlib=libc++ ` flags. On those distributions,
84
+ libc++ needs to be installed from a system package manager, e.g. apt or yum.
85
+ This compatibility matrix shows the versions of libc++ that are supported by
86
+ Swift when building for various Linux versions:
87
+
88
+ | Linux version running Swift application | Supported libc++ package |
89
+ | -----------------------------------------| --------------------------|
90
+ | Ubuntu 22.04 | libc++-15-dev |
91
+ | Ubuntu 24.04 | libc++-18-dev |
92
+
82
93
Swift does not currently support selecting an alternative standard library for
83
- platforms that support alternative standard libraries. For example, you can't use
84
- libc++ when building Swift code for Ubuntu, even though libc++ can be used when
85
- building C++ code for Ubuntu.
94
+ other platforms. For example, you can't use libc++ when building Swift code for
95
+ Windows, even though libc++ can be used when building C++ code for Windows.
86
96
87
97
Mixed Swift and C++ code must use
88
98
the same C++ standard library.
You can’t perform that action at this time.
0 commit comments