Commit Graph

415 Commits

Author SHA1 Message Date
Egor Zhdan
6f0ab5dce8 Merge pull request #83914 from egorzhdan/egorzhdan/guiddef
[WinSDK] Modularize `<guiddef.h>`
2025-09-09 16:24:23 +01:00
Saleem Abdulrasool
b06eed151c Merge pull request #84124 from compnerd/mirroring
SwiftRemoteMirror: export symbols from the library on Windows
2025-09-05 17:28:57 -07:00
Saleem Abdulrasool
e7992a6b6b SwiftRemoteMirror: export symbols from the library on Windows
When building a shared library on Windows, ensure that we export the
symbols. We would previously export none of the interfaces making the
dynamic library unusable. Simplify the macros as
`swiftRemoteMirror_EXPORTS` would only be defined when building a shared
library.
2025-09-05 08:19:20 -07:00
Evan Wilde
0bebd9d190 CMake: Runtime: Extract runtime version number
This extracts the version number computation out into a separate module
to be shared between the runtimes.
Setting `SWIFT_RUNTIME_VERSION` allows external build orchestration
tools to override the version number specified in source if necessary,
while centralizing the location of the default version number across the
runtime libraries.
2025-09-04 12:27:11 -07:00
Mishal Shah
c75932b89f Merge pull request #83748 from swiftlang/bump-version-6.3
Bump the Swift version to 6.3
2025-09-03 21:18:05 -07:00
Saleem Abdulrasool
185ff12154 Merge pull request #83956 from compnerd/strength
Runtimes: ensure that we strongly resolve all symbols on Linux
2025-08-29 10:52:39 -07:00
Justice Adams
ff3fdd32ee [cmake] Use correct identifier for CFBundleIdentifier (#83960)
Use the associated library name for the `CFBundleIdentifier` within the
plist. This will prevent cases where we have projects with multiple
targets referencing the project name itself (i.e swiftSwiftOnoneSupport
had it's bundle name set to SwiftCore)
2025-08-29 10:28:21 -07:00
Egor Zhdan
28f9db7bfa [WinSDK] Modularize <guiddef.h>
This fixes modularization errors that arise when importing a C++ header that contains `#include <guiddef.h>`, which might hijack this header from the WinSDK module where it belongs.
2025-08-28 22:21:55 +01:00
Saleem Abdulrasool
bec67c70a7 Runtimes: ensure that we strongly resolve all symbols on Linux
Ensure that there are no undefined symbols at link time to validate that
we fully specified dependencies. This is the default behaviour on
Windows, but ELF targets will simply make any undefined symbols weakly
defined and rely on load time symbolic resolution.
2025-08-27 11:17:04 -07:00
Mishal Shah
8c2bc9581a Update the runtime version for Supplemental and Overlay libs 2025-08-26 22:55:44 -07:00
Mishal Shah
e5020ed077 Update the runtime version to 6.3 2025-08-26 22:07:42 -07:00
Saleem Abdulrasool
9339a9d942 Synchronization: repair the build on Windows i686
Ensure that we always enable `-whole-module-optimization` as otherwise
we see library calls (e.g. `__atomic_load`) rather than the expected
inlined operation.
2025-08-15 15:21:57 -07:00
Konrad `ktoso` Malawski
5857afebd8 Merge pull request #83726 from edymtt/edymtt/use-darwin-os-lock-in-distributed 2025-08-15 09:23:39 +09:00
Eric Miotto
2c5fdec56a Merge pull request #83725 from edymtt/edymtt/use-darwin-os-lock-in-observation
Observation: do not import all of Darwin to implement locking facilities
2025-08-14 17:00:31 -07:00
Justice Adams
dd7890e644 [Cmake] Use correct magic symbols file for Concurrency (#83619)
We want to use [this magic symbols
file](https://github.com/swiftlang/swift/blob/main/stdlib/public/Concurrency/linker-support/magic-symbols-for-install-name.c),
not [this
one](https://github.com/swiftlang/swift/blob/main/stdlib/linker-support/magic-symbols-for-install-name.c).

Outstanding question: Do we need both?
2025-08-14 16:21:07 -07:00
Eric Miotto
eab65319f9 Distributed: do not import all of Darwin to implement locking facilities
At the same time, drop that dependency in the new build system, so that
we don't add an additional linkage for Darwin platforms compared to what
we are doing in the current build system.

Addresses rdar://158314427
2025-08-14 08:51:36 -07:00
Eric Miotto
4da993f368 Observation: do not import all of Darwin to implement locking facilities
At the same time, drop that dependency in the new build system, so that
we don't add an additional linkage for Darwin platforms compared to what
we are doing in the current build system.

Addresses rdar://158313871
2025-08-14 08:35:06 -07:00
Eric Miotto
5f8386280f Merge pull request #83676 from edymtt/edymtt/build-observation-in-macos-smoketest
Runtimes: build Observation when running macOS smoketest
2025-08-14 06:31:54 -07:00
Gábor Horváth
8558931bd0 Merge pull request #83638 from Xazax-hun/swift-span-for-cxx-string 2025-08-14 07:42:57 +01:00
Saleem Abdulrasool
4231a362a0 Merge pull request #83554 from compnerd/remote-mirror
Runtimes: add SwiftRemoteMirror to the new runtimes build
2025-08-13 16:41:17 -07:00
Eric Miotto
2caa726b0b Merge pull request #83681 from edymtt/edymtt/add-apple-vendor-caches-for-observation
Runtimes: add Apple vendor caches for Observation
2025-08-13 13:49:18 -07:00
Saleem Abdulrasool
7e700889b0 RemoteMirror: add the SwiftRemoteMirror build to the new runtimes build
This adds the final missing runtime library to the runtiems build. With
this addition, the Windows SDK is complete.
2025-08-13 08:48:37 -07:00
Gabor Horvath
2bd8684868 [cxx-interop] Add span accessors to std.string variants
rdar://146944876
2025-08-13 15:49:39 +01:00
Eric Miotto
51e5202ffa Runtimes: build Observation when running macOS smoketest
Piggyback the addition of a flag to specify the path of the
CMakeConfig.h header needed to compile Observation (needed when
consuming SwiftCore through the fine module), and the declaration of
SwiftShims as a dependency.

Addresses rdar://149241712
2025-08-12 12:41:43 -07:00
Eric Miotto
e96cca8276 Runtimes: add Apple vendor caches for Observation
Addresses rdar://156405245
2025-08-12 08:39:50 -07:00
Eric Miotto
44f9d53017 Runtimes: add Apple vendor caches for Distributed
Addresses rdar://156405760
2025-08-11 14:24:22 -07:00
Eric Miotto
62d22412b8 Merge pull request #83640 from edymtt/edymtt/support-builtin-float-in-find-swiftoverlay
Runtimes: add support for Builtin_float in FindSwiftOverlay
2025-08-11 14:14:47 -07:00
Eric Miotto
7acecdcd88 Merge pull request #83604 from edymtt/edymtt/build-distributed-synchronization-in-new-runtimes-build
macOS smoketest: enable Distributed and Synchronization in runtimes
2025-08-11 11:51:38 -07:00
Eric Miotto
0a9b58dad0 Runtimes: add support for Builtin_float in FindSwiftOverlay
This is needed to build Distributed and Cxx overlays in Apple vendor
configurations.

Addresses rdar://158046291
2025-08-11 08:45:14 -07:00
Eric Miotto
48fd452cd6 macOS smoketest: enable Distributed and Synchronization in runtimes
To make this work:
* expose SwiftCMakeConfig.h from the Core build
system, to support scenarios in which the downstream Distributed build
is leveraging the config files generated by CMake itself.
* adjust how SwiftShims is defined in `FindSwiftCore.cmake`, so that the
shims are found from C++ and that we don't get redefinition errors
when multiple module maps are in the search paths.

Fixes #83449
Addresses rdar://149241603, rdar://157165530
2025-08-08 13:17:19 -07:00
Saleem Abdulrasool
0bd975a958 Merge pull request #83594 from compnerd/c++ 2025-08-08 12:53:21 -07:00
Saleem Abdulrasool
36246a2c8e Merge pull request #83576 from compnerd/namespace
Demangling: correct build for the runtime
2025-08-07 12:54:12 -07:00
Saleem Abdulrasool
3c61052945 Cxx: do not tie libstdc++ to Linux
This extracts the C++ runtime detection as recommended by Ben Boeckel.
Detect if `__GLIBCXX__` is defined in `<version>` indicating that
libstdc++ is being used. This allows for building the overlay for
alternative C++ runtimes (e.g. libc++) on Linux.
2025-08-07 10:53:08 -07:00
Saleem Abdulrasool
2ab459abf0 SwiftOnoneSupport, Concurrency: embed plist/manifest (#83569)
Ensure that we install the runtime manifest into the Concurrency
runtime. This is required for the Win32 SxS mechanism to function.
2025-08-07 08:43:38 -07:00
Saleem Abdulrasool
c040f97aff Overlay: add C++ interop libraries
This introduces a build of the C++ interop runtime support to the new runtime library build.

Co-authored-by: Eric Miotto <1094986+edymtt@users.noreply.github.com>
2025-08-07 08:41:17 -07:00
Saleem Abdulrasool
5fe4a7840a Demangling: define SWIFT_RUNTIME when building
This is required to ensure that we do not get ODR violations due to
LLVMSupport being linked in with multiple definitions. We would
previously miscompile the library resulting in a mixed signature
containing both `__swift::runtime::llvm::` and `::llvm::` versions of
`StringRef`.
2025-08-06 15:52:04 -07:00
Saleem Abdulrasool
51e4561ce0 SwiftOnoneSupport, Concurrency: embed plist/manifest
Ensure that we install the runtime manifest into the Concurrency
runtime. This is required for the Win32 SxS mechanism to function.
2025-08-06 08:58:22 -07:00
Saleem Abdulrasool
4a0797999e Volatile: address some feedback from review
This addresses two minor nits from @edymtt in a previous review.
2025-08-05 15:29:31 -07:00
Saleem Abdulrasool
b982f164cd Merge pull request #83447 from compnerd/volatile
Runtimes: add a build for _Volatile
2025-08-04 14:49:39 -07:00
Justice Adams
573607ff36 [cmake] add FindSwiftPlatformOverlay.cmake (#82895)
Add FindSwiftPlatformOverlay module responsible for finding the platform
overlays for the supplemental libraries
2025-08-04 09:19:14 -07:00
Saleem Abdulrasool
90d74395ce Runtimes: add _Volatile module
Introduce a new runtimes build for the `_Volatile` module. This should
hopefully be the final supplemental library that we need for the
completion of the SDK.
2025-07-31 10:15:53 -07:00
Saleem Abdulrasool
7f758e96c3 Runtimes: reorder Resync.cmake, add additional copying
We were not copying over the `Info.plist` and had checked in the file in
a few of the supplemental libraries. Update this now to follow the
proper behaviour.
2025-07-31 10:15:43 -07:00
Saleem Abdulrasool
ecc3874e68 Runtimes: ensure that we validate the linkage on Windows
Treat linker warnings as errors. This is to ensure that we do not
accidentally leak LNK4217 warnings which indicate miscompilation into
the runtimes. I thought that we had worked through them all, however,
one has seemed to have slipped through. The last remaining one is the
`_fatalErrorForwardModeDifferentiationDisabled` from the
`_Differentiation` module. This is incorrectly being marked as DLL
import:

```
LINK : warning LNK4217: symbol '_fatalErrorForwardModeDifferentiationDisabled' defined in 'DifferentiationUtilities-63c1ad.o' is imported by 'SIMDDifferentiation-e793ad.o' in function '$ss5SIMD2VyxSicisSBRzs10SIMDScalarRz16_Differentiation14DifferentiableRz13TangentVectorAdEPQzRszlTJfSUSpSr'
LINK : warning LNK4286: symbol '_fatalErrorForwardModeDifferentiationDisabled' defined in 'DifferentiationUtilities-63c1ad.o' is imported by 'FloatingPointDifferentiation-557cd1.o'
```
2025-07-30 15:14:37 -07:00
Saleem Abdulrasool
bccc22f1ee Merge pull request #83382 from compnerd/android-linkage
Supplemental: Android fixes for the Supplemental Runtimes
2025-07-29 01:38:32 -07:00
Saleem Abdulrasool
36f6ebdf5b Supplemental: adjust Android linkage
This fixes up the Android builds to properly link against the right
modules. With this we properly propagate the necessary flags to build
the runtimes without colliding with existing builds.
2025-07-28 17:27:38 -07:00
Saleem Abdulrasool
e3e56c4d70 Distributed: correct whitespace (NFC)
Clean up whitespace to match style.
2025-07-28 17:27:38 -07:00
Saleem Abdulrasool
ccfa499d43 Android: treat module similar to WinSDK
Setup the interface include directory that seems to not be setup
implicitly by CMake as it should be. This workaround is necessary to
ensure that we are able to build against this module.
2025-07-28 17:27:38 -07:00
Saleem Abdulrasool
33d77a6fa6 CRT: make ClangModules public
When building against the build tree, we need to ensure that the flags
for the ClangModule propagate. This is required to ensure that we get
the modules visible even when building the rest of the SDK.
2025-07-28 17:13:32 -07:00
Saleem Abdulrasool
9273b228a3 Overlay: ensure that the path contains the directory separator
We concatenated the path without consideration for the path separator as
the path separator was expected to be present. This is not guaranteed.
Explicitly add the missing separator which is required to construct the
proper path.
2025-07-28 14:55:10 -07:00
Saleem Abdulrasool
60ad84c33a WinSDK: make ClangModules public
When building against the build tree, we need to ensure that the flags
for the ClangModule propagate. This is required to ensure that we get
the modules visible even when building the rest of the SDK.
2025-07-28 08:57:49 -07:00