Commit Graph

309 Commits

Author SHA1 Message Date
Eric Miotto
4686897dd3 Merge pull request #82035 from edymtt/edymtt/refactor-findswiftcore
[Runtimes][CMake] Refactor FindSwiftCore to put focus on targets...
2025-06-26 06:55:59 -07:00
Alastair Houghton
f7f4a19baf Merge pull request #82417 from al45tair/eng/PR-153531418
[Concurrency] Rename Dummy(Main|Task)Executor.
2025-06-26 10:53:57 +01:00
Alastair Houghton
a1daea92ed [Build][Concurrency] Update new runtime build as well.
We need to update the new runtime build with the filename change also.

rdar://153531418
2025-06-23 18:31:05 +01:00
Saleem Abdulrasool
104eb77272 Runtimes: adjust for incorrect Android behaviour
The runtime mixes `swift` and `swift_static` SDK layouts when building
Swift code on Android. The overlay is always referenced in `swift` and
never from `swift_static`. Adjust the layout to match the driver.
2025-06-23 08:40:43 -07:00
Eric Miotto
4efbe16a6b [Runtimes][CMake] Refactor FindSwiftCore to put focus on targets...
...instead of platforms.

Notable changes/flags:
* Append to variables controlling paths and names, to allow for user
  configuration
* add `SwiftCore_USE_STATIC_LIBS` to generate static archives
* use PlatformInfo variables to get the platform and arch subfolders
  (where appropriate)
* add include guards to ensure PlatformInfo and FindSwiftCore are
    included once in a project
* search for the appropriate static or import library under Windows

Addresses rdar://152838903
2025-06-17 15:39:16 -07:00
Evan Wilde
d34347876d SwiftCore: Cache computed platform info
Implements a similar caching mechanism to what CMake uses for detecting
the compiler. The file is created based on the computed values and
allows us to avoid calling the compiler if we aren't going to extract
out any platform info.
2025-06-09 18:01:56 -07:00
Saleem Abdulrasool
6c9a8b4033 Merge pull request #82072 from compnerd/pre-special
Runtimes: allow enabling prespecialization and library evolution
2025-06-07 14:55:15 -07:00
Evan Wilde
93603987dd Move availability args to response file
The availability flags keep increasing the number of characters on the
command line overflowing the maximum character length on Windows and
making the commands harder to read. This patch moves the generated
arguments into a separate response file so that they can continue to
grow without running into argument length limitations.
2025-06-06 16:58:12 -07:00
Saleem Abdulrasool
be13a2ed87 Runtimes: allow enabling prespecialization and library evolution
Adjust the StringProcessing module to follow the defaults of SwiftCore
with regards to generic metadata prespecialization and the library
evolution modes.
2025-06-06 14:41:32 -07:00
Justice Adams
ecad1d9da1 [cmake] add SINGLE_THREADED_MODE option to Synchronization (#81980)
Add `SwiftSynchronization_ SINGLE_THREADED_MODE` flag to use
empty mutex definition for certain apple platforms. This brings
Synchronization in line with the current build systems functionality

We will revisit this in the future to determine if we can add a mutex
definition for all Darwin platforms
2025-06-04 16:33:55 -07:00
Alastair Houghton
726aaf710f Merge pull request #81940 from al45tair/eng/PR-152498657
Rename SwiftStdlibCurrentOS to StdlibDeploymentTarget.
2025-06-04 17:27:49 +01:00
Alastair Houghton
42ca1b1cc8 Rename SwiftStdlibCurrentOS to StdlibDeploymentTarget.
`StdlibDeploymentTarget` seems to be a better name.

rdar://152498657
2025-06-04 10:40:19 +01:00
Saleem Abdulrasool
75b3fdd121 Merge pull request #81926 from compnerd/android-supplements
Runtimes: repair the Supplemental runtime on Android
2025-06-03 14:31:37 -07:00
Saleem Abdulrasool
3d0d95bfe3 Merge pull request #81927 from compnerd/this-reflects-poorly
runtimes: enable reflection by default on ELFish targets
2025-06-03 13:31:47 -07:00
Saleem Abdulrasool
b7151477e3 Merge pull request #81920 from compnerd/search-party
runtimes: add Android search handling for SwiftCore
2025-06-03 13:31:31 -07:00
Alastair Houghton
d5ed335339 Merge pull request #81440 from al45tair/currentos-availability
[Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
2025-06-03 15:01:22 +01:00
Saleem Abdulrasool
447b50d573 runtimes: enable reflection by default on ELFish targets
We need reflection enabled as swift-collections uses this which is
required for Foundation. Adjust the defaults to allow building
Foundation for Android again.
2025-06-02 20:12:08 -07:00
Saleem Abdulrasool
08d522a643 Runtimes: repair the Supplemental runtime on Android
Adjust the build rules to account for Android which is a separate
platform from Linux.
2025-06-02 20:03:20 -07:00
Guillaume Lessard
db7881ef2c [cmake] InoutLifetimeDependence should be enabled
Addresses rdar://152467655
2025-06-02 18:55:13 -07:00
Saleem Abdulrasool
ce681898b3 runtimes: add Android search handling for SwiftCore
This updates the search handling to account for Android SDK searches on
Windows. This is required to repair the nightly builds.
2025-06-02 17:36:18 -07:00
Alastair Houghton
467f401ef1 [Build] Fix availability platform macros.
These need to be defined always; we'll set them to "unknown" and "none"
respectively if they end up being something we don't understand.

rdar://150966361
2025-06-02 11:30:31 +01:00
Justice Adams
e493bb5033 [cmake] tweak Synchronization compile flags (#81847)
Adding compiler flags which were missing when comparing the old build to
the new build
2025-05-30 09:41:33 -05:00
Alastair Houghton
d110464649 [Build] Fix macos vs macosx issue.
The module triple bizarrely omits the "x" from "macosx".

Also disable some of this code on non-Apple platforms.

rdar://150944675
2025-05-29 18:18:44 +01:00
Alastair Houghton
7e318e2c91 [Build] Use FATAL_ERROR, not ERROR.
We should be using `FATAL_ERROR` for error messages from CMake, not
just `ERROR`.
2025-05-28 14:55:49 +01:00
Alastair Houghton
c749e64f93 [Build] Fix variable name in new build system.
It should have been `SwiftCore_MODULE_TRIPLE`, not
`SwiftCore_SWIFT_MODULE_TRIPLE`.
2025-05-28 14:49:42 +01:00
Konrad `ktoso` Malawski
31b6ae2fcf Merge pull request #80984 from ktoso/task-names-update
[Concurrency][SE-review update] Task names update
2025-05-28 06:23:49 +09:00
Stephen Canon
592d72bba9 Concrete SIMD.init(repeating:) and SIMD.init(lowHalf:highHalf:) optimizations (#81766)
WIP to add more overloads to optimize SIMD codegen on concrete types.
Here we do:

- init(repeating:)
- init(lowHalf:highHalf:)

These are always inlined, even in debug, since LLVM knows how to lower
them to one or two instructions on the targets that we care about.
2025-05-27 15:15:13 -04:00
Justice Adams
6fee86d156 [cmake] add Synchronization specific cache files (#81618)
Add the cache files relevant for building the Synchronization
supplemental library
2025-05-23 13:42:08 -05:00
Alastair Houghton
cd7701cd82 [Build] Add catalyst support to SwiftStdlibCurrentOS.
Add catalyst support for SwiftStdlibCurrentOS.

Also, set a minimum deployment target when building Concurrency;
this stops the build failing when we're trying to build on older
systems where Concurrency didn't really exist yet.

rdar://150966361
2025-05-23 10:31:56 +01:00
Eric Miotto
794fe00351 Merge pull request #81680 from edymtt/edymtt/fix-target-case-find-swift-core
[Runtimes][CMake] Rename `SwiftCore` target to `swiftCore`
2025-05-22 11:19:15 -07:00
Eric Miotto
58a782b98b [Runtimes][CMake] use config mode first in Supplemental build in CI
In this configuration we want to pull dependencies from the current
build, not from the underlying SDK.

Addresses rdar://151784135
2025-05-21 12:20:13 -07:00
Eric Miotto
64da069187 [Runtimes][CMake] Rename SwiftCore target to swiftCore
This matches the case that we use in the Runtimes build system, so we
rely the exported target instead of adding `-lswiftCore`.

Addresses rdar://151700669
2025-05-21 08:52:15 -07:00
Saleem Abdulrasool
8d15d57253 Merge pull request #81597 from compnerd/objectification
Runtimes: mark CommandLineSupporta as an OBJECT library
2025-05-20 14:12:00 -07:00
Justice Adams
dfa4bf7348 [cmake] include CheckCompilerFlag in CatalystSupport (#81623)
add missing import
2025-05-20 11:33:14 -05:00
Saleem Abdulrasool
028624c30d Runtimes: mark CommandLineSupporta as an OBJECT library
This allows compaction into swiftCore when building mirroring the
beahviour of the old build system. This matters solely when building
with a static library distribution of swiftCore where you would
previously need to explicitly link against the swiftCommandLineSupport
library when building with the new build system.
2025-05-19 17:36:49 -07:00
Saleem Abdulrasool
e79760bbed Merge pull request #81558 from compnerd/synchronise-synchronization
Runtimes: adjust the synchronization module build
2025-05-18 20:00:26 -07:00
Saleem Abdulrasool
0b080ac5b8 Runtimes: adjust the synchronization module build
Disable CMP0157 with the old driver as this breaks on Windows. Adjust
the Windows platform ID spelling to repair the Windows build. Take the
opportunity to re-order some of the structure so that it is similar to
the other modules.
2025-05-16 14:43:21 -07:00
Saleem Abdulrasool
029c876f9f Merge pull request #81556 from compnerd/required-core
Runtimes: make `SwiftCore` search `REQUIRED`
2025-05-16 14:08:12 -07:00
Justice Adams
50e30709a5 [cmake] add Synchronization library to Supplemental build (#81310)
Addresses rdar://150300769

Add Synchronization library to new build system

Land https://github.com/swiftlang/swift/pull/81215 first
2025-05-16 11:20:42 -05:00
Saleem Abdulrasool
a81dbe84bd Runtimes: make SwiftCore search REQUIRED
Update the `find_package` to mark `SwiftCore` as `REQUIRED`. This also
re-orders some of the declarations to make the CMakeLists.txt layout
more uniform across the projects.
2025-05-16 08:45:42 -07:00
Justice Adams
758ae18063 [cmake] add FindSwiftCore module for supplemental libraries (#81215)
Add FindSwiftCore to Supplemental cmake modules so we can link against
libswiftCore in a given end users SDK if `SwiftCore_DIR ` is not
provided
2025-05-15 10:55:48 -05:00
Evan Wilde
9993d295fa Merge pull request #81491 from etcwilde/ewilde/enable-commandline-by-default
Runtimes: Enable CommandLine support wholesale
2025-05-14 12:02:18 -07:00
Saleem Abdulrasool
62c384e21d Merge pull request #81479 from compnerd/configuration
Runtimes: tweak default configuration for Windows
2025-05-14 09:45:45 -07:00
Saleem Abdulrasool
25bcfedd5c Merge pull request #81490 from compnerd/compaction
Runtimes: correct CommandLineSupport build on Windows
2025-05-14 09:44:56 -07:00
Saleem Abdulrasool
1b5cb78a51 Runtimes: tweak default configuration for Windows
Enable command line support, library evolution, vector types, file
system support, runtime function counters, and optimization remark
emission. This brings the windows runtime configuration and Darwin
to parity.
2025-05-13 20:01:18 -07:00
Evan Wilde
94e695037c Runtimes: Enable CommandLine support wholesale
CommandLine support builds on all platforms at this time. There is no
need to have a default disabling it anymore. Setting the default option
to enable it on all platforms without condition.
2025-05-13 15:58:20 -07:00
Saleem Abdulrasool
bbd26e823a Runtimes: correct CommandLineSupport build on Windows
We would fail to build the runtime with the new build with command line
support and a shared runtime. The reason for this was that
CommandLineSupport did not properly build against the headers and
attempted to import a locally defined symbol. Correct the build by
indicating that this library is compacted into the runtime.
2025-05-13 15:45:02 -07:00
Guillaume Lessard
bb67d1ef0a Merge pull request #81465 from glessard/rdar151179266-flag-in-swiftinterface
[cmake] LifetimeDependenceMutableAccessors should be enabled
2025-05-13 11:01:19 -07:00
Guillaume Lessard
23217262b2 [cmake] LifetimeDependenceMutableAccessors should be enabled 2025-05-12 18:41:50 -07:00
Saleem Abdulrasool
babfa098fc Runtimes: install the .swiftdoc interface as well
This is part of the development component for the module and is part of
the interface definition. This content is consumed by the user during
development.
2025-05-12 17:36:18 -07:00