Commit Graph

29 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
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
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
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
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
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
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
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
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
Justice Adams
dfa4bf7348 [cmake] include CheckCompilerFlag in CatalystSupport (#81623)
add missing import
2025-05-20 11:33:14 -05: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
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
Saleem Abdulrasool
0f2ed0eb43 Runtimes: refactor swift interface installation
Extract the `install_swift_interface` function into a new file. This
is always invoked to perform the installation of the Swift interfaces as
well as the binary module. Additionally, it prepares for a future
refactoring which will also install the swift documentation interface.
2025-05-12 17:34:43 -07:00
Saleem Abdulrasool
9b6c04e3c7 Merge pull request #81404 from compnerd/disable
Runtimes: disable CMP0157 when building with the old driver
2025-05-10 11:29:07 -07:00
Saleem Abdulrasool
7a7ac3c700 Supplemental: add installation rules for StringProcessing
Introduce install targets for the StringProcessing module. This is a
prerequisite for building a static variant of the standard library to
enable the statically linked early swift driver for Windows to
bootstrap.
2025-05-09 09:59:01 -07:00
Saleem Abdulrasool
fcb6d54b7a Runtimes: disable CMP0157 when building with the old driver
The C++ driver does not work properly with the split build (CMP0157).
Disable this to allow bootstrapping the static runtime on Windows.
2025-05-09 09:58:29 -07:00
Justice Adams
c8f1de2738 [Cmake] Add supplemental cmake modules (#81180)
Adds common CMAKE modules to be used by the supplemental libraries.
Namely:
* ResourceEmbedding
* PlatformInfo
* gyb
* EmitSwiftInterface
* CatalystSupport
2025-04-30 14:23:31 -07:00
Justice Adams
2eaa0e93ad [Runtimes][CMake] Supplemental super-build (#81179)
Continue with https://github.com/swiftlang/swift/pull/81006/

Will land the common Cmake modules next before implementing
Synchronization build
2025-04-30 14:23:04 -07:00
Evan Wilde
4d892e0fe2 [CMake] Fix missing RegexParser dependency
RegexBuilder depends on RegexParser. Without the link dependency, we the
swift module isn't passed to the RegexBuilder build.
2025-03-27 20:55:16 -07:00
Evan Wilde
bab0db68ad [CMake] Build _StringProcessing and RegexBuilder
First pass at getting the StringProcessing and RegexBuilder runtime
libraries built with pure CMake.
2025-03-26 17:37:11 -07:00
Evan Wilde
d7db651b92 [CMake] Get _RegexParser building
This is a first pass at getting the _RegexParser library building.
2025-03-26 16:51:38 -07:00