Commit Graph

605 Commits

Author SHA1 Message Date
Saleem Abdulrasool
18487c289c build.ps1: extract third party dependency builds
Hoist the third party dependency builds before either the SDK loops.
This prepares for the elimination of the legacy SDK builds.
2025-09-09 10:41:28 -07:00
Saleem Abdulrasool
5f3120b201 Merge pull request #84163 from compnerd/macros
build.ps1: isolate bootstrapping macros
2025-09-09 10:30:24 -07:00
Saleem Abdulrasool
b72ef8eb88 Merge pull request #84155 from compnerd/simplify
build.ps1: simplify `Build-Foundation`
2025-09-08 22:43:31 -07:00
Saleem Abdulrasool
7ff21a5e56 build.ps1: isolate bootstrapping macros
Isolate the macros used for building the SDK and the macros built for
distribution. This extricates the macros from the SDK build which is
required for removing the legacy SDK build.
2025-09-08 22:06:42 -07:00
Saleem Abdulrasool
640db7a8b5 Update build.ps1 2025-09-08 17:03:32 -07:00
Charles Zablit
ca35ad7b0f Merge pull request #83588 from charles-zablit/charles-zablit/windows/move-llvm-overrides-to-llvm-repo
[windows] move windows-llvm-lit-test-overrides.txt to the llvm-project repository
2025-09-08 20:53:17 +01:00
Saleem Abdulrasool
13b4b05045 build.ps1: simplify Build-Foundation
`Build-Foundation` will not be retained once the legacy SDK is
eliminated. This simplifies the logic to handle the current invocation
only.
2025-09-08 09:05:30 -07:00
Saleem Abdulrasool
54ca8963f1 build.ps1: clean up SDKROOT references
Use the pre-computed value rather than compute the value twice.
2025-09-03 16:29:29 -07:00
Charles Zablit
2ecb65d60a [windows] move llvm test overrides to the llvm-project repository 2025-09-01 16:04:53 +02:00
Saleem Abdulrasool
090bc168b8 Merge pull request #84016 from compnerd/extraction
build.ps1: extract `SDKROOT` in `Build-ExperimentalSDK`
2025-08-31 12:21:30 -07:00
Saleem Abdulrasool
9c45006927 build.ps1: remove some unnecessary flags
Adjust the build to remove some flags for `swift build` that are no
longer necessary now that we stage the toolchain better and setup the
environment, we can simplify the build.
2025-08-29 17:07:51 -07:00
Saleem Abdulrasool
3897b89d70 build.ps1: extract SDKROOT in Build-ExperimentalSDK
Extract a variable for the re-computed value of the SDKROOT.
2025-08-29 13:14:58 -07:00
Saleem Abdulrasool
0b3df2555d Merge pull request #83881 from Steelskin/fabrice/ignore-linker-warning-long-sections
Runtime: Ignore long section names linker warnings
2025-08-28 09:54:49 -07:00
Saleem Abdulrasool
52f04d0d34 build.ps1: extract SDKROOT for multi-reference use
This should allow us to switch SDKs for the toolchain build.
2025-08-27 09:40:43 -07:00
Fabrice de Gans
854a250c20 Disable longsections warning in more cases 2025-08-26 08:47:02 -07:00
Saleem Abdulrasool
16b71df789 Merge pull request #83867 from mhegazy/mimalloc-patch-fix
Fix order of building mimalloc with `-IncludeNoAsserts`
2025-08-25 20:20:07 -07:00
Charles Zablit
7c5c94f975 Merge pull request #83615 from charles-zablit/charles-zablit/windows/update-to-3.10.1
[windows] upgrade to Python 3.10.1
2025-08-25 18:43:54 +01:00
Fabrice de Gans
d080e2f405 Move the longsections argument to build.ps1 2025-08-25 09:42:10 -07:00
Saleem Abdulrasool
fdb1f93ca4 Merge pull request #83852 from compnerd/android
build.ps1: add a workaround for Android build break
2025-08-24 05:00:24 -07:00
Saleem Abdulrasool
c4862a6238 Merge pull request #83879 from compnerd/lto
build.ps1: introduce the ability to do LTO
2025-08-23 23:22:19 -07:00
Saleem Abdulrasool
ec394840b7 Merge pull request #83666 from Steelskin/fabrice/build-corelibs-dispatch-arch-subdir
build: Install dispatch libraries in arch subdir
2025-08-22 13:40:47 -07:00
Saleem Abdulrasool
6aedcc5745 build.ps1: introduce the ability to do LTO
While it is possible to do LTO with MSVC, we cannot do that just yet.
This at least allows some experimentation with LTO with clang-cl.
2025-08-22 11:56:36 -07:00
Mohamed Hegazy
effe6d6781 Split Build-mimalloc into two functions 2025-08-21 19:20:52 -07:00
Saleem Abdulrasool
3224bb4e52 build.ps1: add a workaround for Android build break
The C++ driver will not add in the architecture to the library search
path when building for Android on Windows. Workaround this by
explicitly adding in the addition library search path. Once the early
swift-driver is enabled, this should be possible to remove.
2025-08-21 12:29:52 -07:00
Saleem Abdulrasool
99462a67b5 Merge pull request #83839 from compnerd/stage
build.ps1: stage the experimental SDK runtime
2025-08-21 08:55:18 -07:00
Saleem Abdulrasool
20c23718ad build.ps1: stage the experimental SDK runtime
Setup the experimental runtime image. We currently inject a
`.experimental` suffix to isolate it from the legacy image. This is a
staging artifact and will be removed once we remove the legacy runtime
build.
2025-08-20 13:03:57 -07:00
Saleem Abdulrasool
d09424a016 build.ps1: add CMAKE_NINJA_FORCE_RESPONSE_FILE
Add the flag to force a response file usage with Ninja to avoid
exhausing the Windows command line limits.
2025-08-20 08:43:32 -07:00
Saleem Abdulrasool
93daeff4b4 Merge pull request #83796 from compnerd/clang
build.ps1: intrduce the ability to build with clang optionally
2025-08-19 09:29:34 -07:00
Saleem Abdulrasool
900be48eea Merge pull request #83717 from compnerd/dynamic-experimental-sdk
utils: build the dynamic experimental SDK
2025-08-19 08:50:08 -07:00
Charles Zablit
3161a8b08e [windows] upgrade to Python 3.10.1 2025-08-19 11:26:33 +01:00
Saleem Abdulrasool
af46e6cf14 build.ps1: intrduce the ability to build with clang optionally
Add a `-UseHostCompiler` option which allows you to to pass in
`-UseHostCompiler=$False` to switch to using the bootstrap compiler to
build the toolchain.
2025-08-18 12:54:51 -07:00
Saleem Abdulrasool
fcc1d00a05 Merge pull request #83781 from compnerd/documentation 2025-08-18 10:41:56 -07:00
Saleem Abdulrasool
2997a0e345 build.ps1: attempt to repair the ARM64 cross-compile 2025-08-17 22:03:08 -07:00
Saleem Abdulrasool
7204559251 build.ps1: improve documentation (NFC)
Update the documentation for the parameters, remove the public
documentation for "advanced" options (e.g. to control migration, CI
schemes, etc).
2025-08-17 18:31:38 -07:00
Saleem Abdulrasool
4c8b42f6cf Merge pull request #83758 from compnerd/organisation
build.ps1: organise script options
2025-08-16 10:28:48 -07:00
Alex Hoppen
7ce649c168 [Windows] Use a multiroot data file to test (corelibs-)foundation on Windows
We currently rebuild swift-syntax, swift-foundation-icu and swift-foundation twice: Once to test swift-foundation and once to test swift-corelibs-foundation. Using a unified build for both projects means that we only need to rebuild them once, saving ~5 minutes.

(cherry picked from commit 61f833c04c)
2025-08-15 12:17:43 -07:00
Saleem Abdulrasool
47f680f998 build.ps1: organise script options
Organise the build options which have grown organically. We have a
number of options that are co-dependent but were spread apart. Ideally,
we would like to minimise the options. There are a number of "options"
which are less so user-configurable options but rather options to allow
migration (e.g. python version, sccache version). There are some options
which are temporary and would be ideal to simply drop at some point
(`IncludeDS2` should always be true, `IncludeNoAsserts` should
become toolchain variants to build, and `FoundationTestConfiguration` is
meant to be a CI configuration).
2025-08-15 09:12:23 -07:00
Fabrice de Gans
9b8fbfeac8 utils: Remove unused CMake args in the SDK jobs
CMake warns about these unused arguments during configuration.
2025-08-14 10:16:37 -07:00
Saleem Abdulrasool
d7ff986821 utils: build the dynamic experimental SDK 2025-08-13 22:15:06 -07: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
Ben Barham
31f344de84 Merge pull request #83693 from ahoppen/no-multiroot-data-file-windows
[Windows] Stop using multiroot data file
2025-08-13 09:31:53 -07:00
Saleem Abdulrasool
d51491f008 build.ps1: enable SwiftRemoteMirror in the experimental SDK
Ensure that we build the swift remote mirror on Windows in the
experimental SDK builds.
2025-08-13 08:48:37 -07:00
Saleem Abdulrasool
1fafd48dc4 Merge pull request #83644 from compnerd/cdispatch 2025-08-13 07:28:23 -07:00
Alex Hoppen
8ef0e2ae92 Add comment to -j 1 for Foundation test execution 2025-08-13 13:08:00 +02:00
Alex Hoppen
b48d052f64 Revert "[Windows] Use a multiroot data file to test (corelibs-)foundation on Windows"
This reverts commit 61f833c04c.
2025-08-13 13:06:32 +02:00
Saleem Abdulrasool
4defa6048e Merge pull request #83653 from compnerd/pinned-extraction-negotiation
build.ps1: adjust the pinned toolchain extraction location
2025-08-12 15:26:57 -07:00
Fabrice de Gans
5ba381ea7e build: Install dispatch libraries in arch subdir 2025-08-12 08:56:59 -07:00
Alex Hoppen
d3d8576ec4 Merge pull request #80122 from ahoppen/windows-multiroot-data-file
[Windows] Use a multiroot data file to test (corelibs-)foundation on Windows
2025-08-12 08:12:13 +02:00
Saleem Abdulrasool
d6d4182492 build.ps1: rename the extracted toolchain location
Strip the `swift-` prefix and the `-a-windows10` suffix on the
toolchain. This allows us to get back within the path limits which
otherwise prevents extracting the experimental SDK.
2025-08-11 15:43:04 -07:00
Saleem Abdulrasool
75a6d10140 build.ps1: allow querying a specific SDK from the pinned toolchain
This allows us to use a specific SDK from the pinned toolchain image. By
enabling this functionality, we can migrate towards a newer snapshot and
build the early swift-driver.
2025-08-11 15:43:04 -07:00