Commit Graph

12 Commits

Author SHA1 Message Date
Alastair Houghton
0fa5e65bb2 [Stdlib][Build] Fix the standard library build for fully static Linux.
Mostly this just means adding `Musl` as a module dependency of various
things and making sure that we build things for `swift_static` even
if `SWIFT_BUILD_STATIC_STDLIB` isn't enabled.

There's also a slight difference in the declaration of `memcmp()`;
musl's declaration is more like the one we have on Darwin.

rdar://123508245
2024-05-07 16:56:20 +01:00
Egor Zhdan
53fb6531f2 [cxx-interop] Add conversions between std::chrono::duration and Swift.Duration
rdar://123696734
2024-03-01 13:15:05 +00:00
Crazy凡
02a9259dda [cxx-interop] Provide similar support for std::u32string as std::string and std::u16string. 2023-10-10 16:01:15 +08:00
Egor Zhdan
4ce4527ef1 [cxx-interop] Make CxxShim header and modulemap arch-independent
This moves `libcxxshim.modulemap`, `libcxxshim.h` and `libcxxstdlibshim.h` from `*.xctoolchain/usr/lib/swift/macosx/arm64e` to `*.xctoolchain/usr/lib/swift/macosx` to simplify distribution.

rdar://110788977
2023-06-20 15:57:38 +01:00
Egor Zhdan
ce2b116dab [cxx-interop] Enable CxxShim headers for armv7k watchOS
This fixes the `no such module 'CxxStdlibShim'` error when building CxxStdlib for armv7k.

For watchOS, armv7k is included in `${SWIFT_SDK_${sdk}_MODULE_ARCHITECTURES}` but not in `${SWIFT_SDK_${sdk}_ARCHITECTURES}`.

rdar://108206099
2023-04-18 18:03:52 +01:00
Egor Zhdan
242a432919 [cxx-interop] Conform std::string to Hashable
rdar://107709149
2023-04-06 16:15:40 +01:00
Egor Zhdan
1d5de34702 [cxx-interop] Move CxxShim header from the SDK to the toolchain
rdar://105799283
2023-02-25 00:23:43 +00:00
Daniel Rodríguez Troitiño
0b05a1ed2d [cxx-interop] Hook libcxxshim modulemap/header to sdk-overlay (#62475)
The modulemap and header files target was added to `ALL`, which works
when invoking the build thru the `build-script`, but make some test fail
when doing a manual configuration and later doing
`check-swift-validation` or similar, because the modulemap/header were
not copied into the build directory.

Follow a pattern similar to the one in GlibC (which this file seemed to
be prepared for, since the `libcxxshim_modulemap_target_list` variable
was already there), create a global target for all the modulemap/headers
of each SDK and add that global target as a dependency of sdk-overlay
(which is a dependency of check-swift-validation and others).
2022-12-09 10:15:18 -08:00
Saleem Abdulrasool
ee996da32d stdlib: enable cxxshim for Windows
This is used by the test suite and needs to be enabled for Windows to
enable parts of the test suite.
2022-10-08 14:19:22 -07:00
Egor Zhdan
b9f9eac7d9 [cxx-interop] NFC: Remove unused source file
`libcxxshim.swift` is not referenced from CMakeLists, and is not needed because libcxxshim is a pure C++ module.
2022-08-22 16:24:08 +01:00
zoecarver
8cf4d3b983 [cxx-interop] Disable cxxshim on windows until we can figure out cmakeconfig. 2022-07-05 20:03:45 -07:00
zoecarver
3805828ad0 [cxx-interop] Add CxxShim library; move __swift_interopStaticCast into it. 2022-07-05 15:52:51 -07:00