Commit Graph

605 Commits

Author SHA1 Message Date
Saleem Abdulrasool
682b38d3c3 Merge pull request #83411 from compnerd/build-root
build.ps1: compute the proper SDK for building the runtime
2025-07-29 23:55:42 -07:00
Saleem Abdulrasool
19049aa2cf build.ps1: remove unnecessary CMake options
Remove `CMAKE_SYSTEM_NAME` and `CMAKEY_Swift_COMPILER_WORKS` from the
CMake invocation for building the experimental SDK.
2025-07-29 21:02:28 -07:00
Saleem Abdulrasool
12fa83ef23 build.ps1: remove CMAKE_NINJA_FORCE_RESPONSE_FILE 2025-07-29 21:01:44 -07:00
Saleem Abdulrasool
4f92705a3b build.ps1: correct case
Adjust the case to match; although PowerShell is case insensitive for
the variable handling, it makes it easier to follow.
2025-07-29 20:57:50 -07:00
Saleem Abdulrasool
e58e02fa29 Merge pull request #83332 from compnerd/experimental-dynamic-prep
utils: prepare for enabling the dynamic experimental SDK
2025-07-29 20:01:41 -07:00
Mishal Shah
9b235983cf Merge pull request #82914 from charles-zablit/charles-zablit/windows/fix-arm64-build-error
[windows] update to the 6.1.2 toolchain in build.ps1
2025-07-29 16:09:39 -07:00
Saleem Abdulrasool
b1d1db77f1 build.ps1: compute the proper SDK for building the runtime
Ensure that we properly use the platform information to select the SDK.
We had a number of cases where we assumed that the platform was Windows.
That no longer holds today as we build for more platforms.
2025-07-29 15:42:15 -07:00
Fabrice de Gans
be89a853c1 utils: Do not set the Androic C/C++ compilers
Due to a bug in CMake, the `project()` invocation for Android projects
always overrides the `CMAKE_C_COMPILER` and `CMAKE_CXX_COMPILER` passed
on the command line with the compilers from the NDK installation.

Since the values we passed on the command line were not taking effect,
these changes remove them from the cmake invocation. This fixes
incremental Android builds.
2025-07-29 15:24:15 -07:00
Saleem Abdulrasool
95227f9bb0 build.ps1: compute SDKROOT once in the experimental runtimes build
This value is re-used. Compute it once and re-use the value to ease the
future transition.
2025-07-29 12:53:27 -07:00
Saleem Abdulrasool
8335d82eef utils: precompute binary cache locations 2025-07-29 10:31:19 -07:00
Saleem Abdulrasool
6040648b9e utils: specify linkage types for experimental SDK 2025-07-29 10:29:20 -07:00
Saleem Abdulrasool
c1530f6228 utils: rename StaticFoundation to ExperimentalFoundation 2025-07-29 10:29:20 -07:00
Saleem Abdulrasool
9706951e5b utils: simplify signature for Build-ExperimentalRuntime 2025-07-29 10:29:20 -07:00
Saleem Abdulrasool
684d75ba02 Differentiation: build Differentiation in the experimental SDK
Add the differentiation module to the experimental SDK on Windows.
2025-07-26 00:29:59 -07:00
Saleem Abdulrasool
672014e52b Observation: wire up SwiftOverlay to the build
Ensure that we are building against the right overlay libraries and wire
them up into the build.
2025-07-25 11:19:20 -07:00
Mohamed Hegazy
46b63549d2 Make sure mimalloc is built before we build noasserts toolchain 2025-07-24 11:48:31 -07:00
Saleem Abdulrasool
5a4bbf3b0d Merge pull request #82135 from compnerd/flags
utils: refactor CMake invocation construction
2025-07-23 17:24:13 -07:00
Fabrice de Gans
ea0097c581 build: Update swift-crypto 3.12.3 -> 3.12.5
Changelog:
* apple/swift-crypto@d79c573 Make Build: Disable CMP0157 (apple/swift-crypto#387)
* apple/swift-crypto@ebcbfc6 build: Make swift-crypto build on Windows (apple/swift-crypto#385)
* apple/swift-crypto@785709b Fix broken Windows tests (apple/swift-crypto#350) (apple/swift-crypto#386)
2025-07-23 09:45:31 -07:00
Saleem Abdulrasool
21533c68f0 utils: add Distributed to the experimental Windows SDK
We now have distributed in the SDK set as well. This brings us closer to
having a complete static SDK on Windows.
2025-07-18 14:55:47 -07:00
Saleem Abdulrasool
e297922e57 utils: refactor CMake invocation construction
Make the flag handling more explicit for the various platforms. This
prepares us to add additional SDKs in the future which require separate
handling of flags.

Co-authored-by: Fabrice de Gans <steelskin@gmail.com>
2025-07-18 08:54:39 -07:00
Saleem Abdulrasool
a220f2ed3d utils: build the static Obversation module on Windows
Extend the experimental SDK with the Observation module as we work
towards a complete SDK distribution.
2025-07-17 15:16:04 -07:00
Saleem Abdulrasool
2e8f74f011 Merge pull request #83131 from compnerd/synchronized-overlay
Runtimes: wire up the overlay to the Synchornization library
2025-07-17 15:06:39 -07:00
Saleem Abdulrasool
f19e5b4476 Runtimes: wire up the overlay to the Synchornization library
This allows us to pass along the overlay VFS mappings to workaround the
PCM compilation not receiving the builtin mapping from the compiler.
2025-07-17 08:57:53 -07:00
Charles Zablit
6d42649ff9 [windows][lldb] fix incorrect LLVM_HOST_TRIPLE when cross-compiling 2025-07-15 17:21:23 +02:00
Ben Barham
1ac84912d9 Revert "[Build] Temporarily add -j 1 to swift-corelibs-foundation Windows build" 2025-07-11 12:27:52 -07:00
Saleem Abdulrasool
a3e7e8b500 utils: correct flag handling for static runtime libdispatch handling
We were not passing along the proper flags to the runtime build
resulting in the library expecting libdispatch to be linked dynamically.
2025-07-11 11:29:30 -07:00
Saleem Abdulrasool
817922175d Merge pull request #82932 from compnerd/static-flags
utils: build static runtime with static dispatch and closure
2025-07-10 14:46:09 -07:00
Evan Wilde
ef9e7144db Merge pull request #82583 from etcwilde/ewilde/update-dep-versions
Update collections, crypto, certs, and asn1 tag
2025-07-10 11:10:35 -07:00
Charles Zablit
31942a0201 [windows] update to the 6.1.2 toolchain in build.ps1 2025-07-10 12:59:23 +01:00
Saleem Abdulrasool
8b74c09b8f utils: build static runtime with static dispatch and closure
Although we would like these to be dynamic, we currently cannot build
them properly due to limitations of the build system. Adjust the build
to pass in additional flags to properly build the runtimes for that
environment as a temporary measure.
2025-07-09 14:41:59 -07:00
Evan Wilde
2ff24aa0a7 build.ps1: Update reference to CCryptoBoringSSL
The CCryptoBoringSSL library changed from C to C++, which means that the
static archive on Windows changed names, from `CCryptoBoringSSL.lib` to
`libCCryptoBoringSSL.lib`. The SourceKit-LSP SwiftPM test invocation
explicitly passed `CCryptoBoringSSL.lib` to the SwiftPM invocation,
resulting in the wrong search path. Pointing it at the correct location
now.
2025-07-08 11:12:01 -07:00
Fabrice de Gans
59bf7424bc utils: Link static Foundation with static Dispatch
Previously, the static Foundation build was linking against the dynamic
Dispatch build, resulting in a build failure when linking against the
static Foundation. This fixes the issue by linking the static Foundation
build against the static Dispatch build.
2025-07-07 14:38:16 -07:00
Saleem Abdulrasool
fa3db90ae3 Merge pull request #82191 from compnerd/static-libdispatch
utils: update experimental SDK builds
2025-07-06 10:25:54 -07:00
Saleem Abdulrasool
d9b0b9e0e1 Merge pull request #82734 from compnerd/tree-structuring
utils: adjust tree layout modification logic for static SDKs
2025-07-04 15:46:56 -07:00
Ben Barham
c78fa45555 [Build] Temporarily add -j 1 to swift-corelibs-foundation Windows build
We haven't been able to reproduce with `-j 1` yet. While it's slower, at
least we might be able to unblock CI while we continue to investigate.
2025-07-03 18:45:16 -07:00
Saleem Abdulrasool
cb757bcae4 utils: adjust tree layout modification logic for static SDKs
This adjusts the layout to now package up the static SDK properly.
2025-07-02 11:48:52 -07:00
Saleem Abdulrasool
06aa42b75c Merge pull request #82346 from compnerd/static-foundation-setup
utils: adjust the StaticFoundation builds on Windows
2025-07-02 08:22:44 -07:00
Saleem Abdulrasool
e55af870ce utils: adopt SwiftCore_DIR in new builds
Rather than pass along build configuration context to the subsequent
builds, wire together the CMake configuration to the builds to allow
building the runtime properly.
2025-06-23 08:39:59 -07:00
Fabrice de Gans
b334c8eda1 libxml2: Explicitly set the LLDB LibXML2 version (#82210)
With this change, the `LibXml2_DIR` CMake define is no longer overridden
on configure and actually takes effect when building lldb.
2025-06-18 20:21:52 -07:00
Saleem Abdulrasool
7e6b7c8613 build: avoid installing SQLite3 (#82322)
We build SQLite statically. We do not need to stage this into an install
location to use. Directly pass along the paths modified as a build
product.
2025-06-18 18:16:16 -07:00
Saleem Abdulrasool
d20070841b utils: adjust the StaticFoundation builds on Windows
This is in preparation for the addition of libdispatch to the SDK.
2025-06-18 10:38:00 -07:00
Saleem Abdulrasool
2ba4e7fa20 utils: pass along Foundation and XCTest to TSC (#82267)
This is required to build the TSCSupport module for SPM's consumption.
2025-06-17 10:07:56 -07:00
Mohamed Hegazy
9c2c6c9143 [build.ps1] Honor --SkipBuild with --IncludeNoAsserts (#82271)
Missed in my previous change. This makes it so that we donot build the
no asserts toolchain if `--skipBuild` is passed with
`--IncludeNoAsserts`
2025-06-17 10:06:20 -07:00
Saleem Abdulrasool
5dd0825cc9 utils: update experimental SDK builds
Adjust the build of the experimental SDK to build libdispatch
statically.
2025-06-11 11:45:14 -07:00
Mohamed Hegazy
276261c2f3 Merge pull request #81644 from mhegazy/no-asserts-toolchain
[build.ps1] Revamp No-asserts toolchain build and packaging
2025-06-11 09:30:25 -07:00
Ben Barham
0afeafac37 Merge pull request #82071 from bnbarham/pass-through-toolchain-version
[Build] Pass the toolchain version through to Swift's compilation
2025-06-08 17:17:59 -07:00
Evan Wilde
8ea765728b Use a response file for stdlib sources
The experimental stdlib runtime build has several sources files,
resulting in an absolutely massive commandline. This seems to be
approaching, or passing, the maximum command line length on Windows.
Switch the Windows build to use a response file generated by CMake to
pass the source files to the compiler.
2025-06-06 15:54:45 -07:00
Ben Barham
3982ebbbb3 [Build] Pass the toolchain version through to Swift's compilation
Passes the value of the environment variable `TOOLCHAIN_VERSION` through
to Swift's `SWIFT_TOOLCHAIN_VERSION` for use in eg.
`-print-target-info` (and some day, `--version`).
2025-06-06 15:09:21 -07:00
Saleem Abdulrasool
12e18ea5d4 utils: repair the Android build
Adjust the parameters to the runtime libraries to ensure that we are
building the runtimes for Android properly.
2025-06-02 17:39:39 -07:00
Saleem Abdulrasool
9040fab1d1 utils: adjust the "platform" install rules
Rename `Install-Platform` to `Install-SDK` as it adjusts the SDK layout.
This is something that we should work towards minimising and ensuring
that the install rules in CMake properly stage the files. In the mean
time, this allows us to properly structure the SDK.

Alter the parameters to avoid the explicit OS, extracting it from the
platform set provided. Additionally provide an SDK identifier to allow
us to handle the experimental SDKs as well.
2025-05-26 13:39:21 -07:00