Commit Graph

18 Commits

Author SHA1 Message Date
Alastair Houghton
0813e95569 Merge pull request #81440 from al45tair/currentos-availability
[Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
2025-07-07 12:04:00 +01:00
Saleem Abdulrasool
3106f15165 Runtimes: adjust the default settings for Windows
This adjusts the default settings for the Windows build of the Swift
runtime to include reflection and to re-order them to match the Darwin
configuration to make it easier to identify differences.
2025-03-21 12:11:41 -07:00
Evan Wilde
8fe9c094c3 Fix runtime default variable naming
The names of the variables in `DefaultSettings` should end in `_default`
so that the variable that they are defaulting can be overridden.
Otherwise CMake will just set the value and move on overriding the
setting coming from the commandline/cache file.
2025-02-17 10:44:45 -08:00
Saleem Abdulrasool
69a3cd8e29 Apply suggestions from code review
Co-authored-by: Evan Wilde <etceterawilde@gmail.com>
2025-02-14 16:19:45 -08:00
Saleem Abdulrasool
1ac0007883 Runtimes: introduce swift_Concurrency
This adds the `swift_Concurrency` module to the new runtimes build. This
is sufficient to build the code but will require further fine tuning to
ensure that all the flags entirely identical and that the ABI surface is
also fully replicated.
2025-02-13 16:24:36 -08:00
Eric Miotto
2a367234be Runtimes: support generic metadata prespecialization for all of Core
Also provide a flag to enabled/disable it.

Addresses rdar://144255917
2025-02-07 07:39:21 -08:00
Evan Wilde
5aadacee41 CMake: SwiftCore: Add back SWIFT_STDLIB_SUPPORTS_BACKTRACE_REPORTING
Add an option to enable emitting a stacktrace on calls to `fatalError`.
This is unrelated to the runtime backtracer for diagnosing normal Swift
crashes.

rdar://142440689
2025-01-23 12:42:28 -08:00
Saleem Abdulrasool
59a9ef5bb7 Merge pull request #78134 from etcwilde/ewilde/x-platform-fixes
[CMake] Fix some issues in new runtime build for Linux and Windows builds
2024-12-12 18:11:07 -08:00
Saleem Abdulrasool
6d678ac01d Core: specify the threading package that is in use
This is required for the non-Darwin targets as `SWIFT_THREADING_DARWIN`
does not enable any additional code. However, that macro is used in
other places that are not yet integrated. This was identified by
building for Windows.
2024-12-12 10:48:43 -08:00
Evan Wilde
979697eb13 CMake: Fix expanding the default variable
`defaulted_set` wasn't expanding the default variable, just setting the
value of the variable the name of the variable that should have been
doing the defaulting.
2024-12-11 19:48:36 -08:00
Evan Wilde
e160e23dde [CMake] Connecting more flags and options
Making a more in-depth pass over the definition macros and flags in
SwiftSource.cmake _add_target_variant_swift_compile_flags.
These are only flags that actually matter for swiftCore though. This
does not include concurrency flags.
2024-11-12 11:31:10 -08:00
Evan Wilde
2df8a185b8 [cmake] Add private build extension points
Adding vendor-specific extension points to the build system, giving
vendors a place to put their internal settings and defaults, without
having to modify the build directly. This helps reduce the chances of
merge conflicts and public changes breaking internal settings.

The location of the macros are set with `SwiftCore_PRIVATE_MODULE_DIR`,
so vendors can keep their private extensions in a separate location if
desired. Otherwise, it defaults to `cmake/modules/private`, which
intentionally does not exist at this time.

Currently, we have extensions for the default settings and global
settings.
2024-11-08 17:05:41 -08:00
Evan Wilde
148a910d7b [nfc] Add documentation to default macros
Adding documentation on the behavior of the `defaulted_option` and
`defaulted_set` macros.
2024-11-08 16:41:30 -08:00
Evan Wilde
9185606027 [cmake] Add macro to create defaulted settings
Adding a macro to tie non-boolean variables into the defaulting
mechanism.
2024-11-08 15:58:27 -08:00
Evan Wilde
2a8bb9db93 Adding ELF swiftrt for BSD and Android
BSD and Android also need to build swiftrt.o so adding it to the
default settings.
2024-11-07 15:23:52 -08:00
Evan Wilde
4f6489f746 Fixing comments
Fixing some of the comments in DefaultSettings.cmake and
PlatformInfo.cmake.

I haven't added any vendor cache files yet, so the comment doesn't point
anywhere. Also fixing the reference to the location of the clang
resource headers in PlatformInfo.cmake.
2024-11-06 21:27:53 -08:00
Evan Wilde
e2b878b4e9 Setup reasonable defaults
This patch makes it simpler to setup reasonable defaults for a given
platform. The standard library has many knobs for configuration
purposes. This is great for providing cache files to configure specific
builds, but the build system should still generally work if someone runs
a minimal CMake invocation against the build without futzing with
various options.
2024-11-06 21:27:53 -08:00
Evan Wilde
96429952bb Build runtime library
Getting the runtime libraries building, while also ironing out more of
the macro definitions and flags.
2024-11-06 21:27:53 -08:00