Commit Graph

8483 Commits

Author SHA1 Message Date
Saleem Abdulrasool
b36cee28a6 Merge pull request #80611 from compnerd/installer
utils: update the installer build invocation
2025-04-09 17:39:05 +03:00
Mishal Shah
701c3ff436 Merge pull request #80625 from swiftlang/support-release-6.1.1
[update-checkout] Add Swift 6.1.1 branch scheme to the config file
2025-04-08 22:20:25 -07:00
Saleem Abdulrasool
89091904d7 Merge pull request #80609 from compnerd/case
utils: adjust the emission of `SDKSettings.json`. Use lowercase spellings for the platform names to match SwiftBuild's expectations as pointed out by @jakepetroules.
2025-04-09 02:37:43 +03:00
Slava Pestov
8c11d78672 Merge pull request #80510 from slavapestov/mutable-span-compat
CompatibilitySpan: Add MutableRawSpan.swift, MutableSpan.swift
2025-04-08 15:03:59 -04:00
Slava Pestov
504e83c3ad Merge pull request #80596 from slavapestov/swift-6.1-is-out
Update 'SwiftStdlib 6.1' availability macro
2025-04-08 08:51:46 -04:00
Saleem Abdulrasool
b33be25549 Merge pull request #80441 from brianmichel/brian/always-restore-env-variables
Always restore old env variables
2025-04-08 10:35:23 +03:00
Mishal Shah
0a18603b6a [update-checkout] Add Swift 6.1.1 branch scheme to the config file 2025-04-07 23:09:10 -07:00
Slava Pestov
89aabcb688 Add temporary 'SwiftCompatibilitySpan 6.2' availability macro 2025-04-07 21:32:48 -04:00
Brian Michel
07dac7b5c5 Update utils/build.ps1
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2025-04-07 17:01:28 -04:00
Saleem Abdulrasool
b264ff8a15 utils: update the installer build invocation
Adjust the install path computation to support installation of ARM64 on
AMD64. This enables the isolation of the runtimes on all architectures
for Windows to allow building the isolated runtime distribution.
2025-04-07 12:31:24 -07:00
Saleem Abdulrasool
c3d7c9dc5f utils: print SCCache summary in summary view
This prints the stats for SCCache in the build as well to help
understand cache utilisation.
2025-04-07 12:30:41 -07:00
Saleem Abdulrasool
5d5fff9fc0 utils: adjust the emission of SDKSettings.json
Address the feedback from @jakepetroules about cases.
2025-04-07 12:29:35 -07:00
Slava Pestov
f7e89054f8 Update 'SwiftStdlib 6.1' availability macro 2025-04-07 12:06:42 -04:00
Saleem Abdulrasool
a20b568c07 Merge pull request #80157 from compnerd/helper
utils: extract `Build-SDK` helper
2025-04-07 18:19:29 +03:00
Hamish Knight
af5ec3eb1e Merge pull request #80533 from hamishknight/gen-time
[xcodegen] Print the time taken to generate
2025-04-04 21:29:23 +01:00
Hamish Knight
063341b563 [xcodegen] Print the time taken to generate 2025-04-04 13:50:52 +01:00
Mishal Shah
dbf648b172 [update-checkout] Swift 6.2 release branch support 2025-04-03 23:43:24 -07:00
Doug Gregor
e49afc8797 Merge pull request #80389 from 3405691582/nobtcfi
Add a build flavor to opt-out of BTCFI on OpenBSD.
2025-04-03 13:29:04 -07:00
Brian Michel
c9437b522b Always restore old env variables
When we invoke the script block it could throw an exception so we should
wrap it in a try finally block to ensure that we can restore the old
environment variables, otherwise you can end up back in a shell that has
an incorrect set of variables set.

This is most noticable if an exception is thrown when entering the vs
dev shell since without resetting the old vars you will have invalid
Visual Studio env variables set meaning you need to manually reset your
shell environment.
2025-04-01 12:32:19 -04:00
Brian Michel
c0c9116bd6 Remove cache configuration from EanbleCaching
EnableCaching should only configure cmake to allow for sccache usage, it
should not configure sccache itself in any way. Those configuration
options should be deferred into the environment variables that sccache
will look for when it starts up.
2025-04-01 11:13:06 -04:00
Brian Michel
09664ee7cb Add remote caching option
When setting up sccache we can choose between local disk caching or
remote caching via an S3-ish blob storage engine. To allow for backward
compatibility for anyone that might be using the existing option for
disk caching we leave it place and instead provide a new remote caching
option.

This option assumes you've read the sccache documentation for setting up
the correct environment variables for telling sccache where to find the
bucket and how to authenticate to it.
2025-03-31 19:28:35 -04:00
Saleem Abdulrasool
36af875572 Merge pull request #80289 from jeffdav/win-build-compilers-test-split
utils: Breakup Build-Compilers into Build- and Test- steps.
2025-03-29 17:19:47 -07:00
3405691582
a341ce5570 Add a build flavor to opt-out of BTCFI on OpenBSD.
To work-around #80059, we need to stop return address signing and
opt-out of BTCFI enforcement via enabling a platform linker option.

We don't want to completely undo the BTCFI work in the rare case that
we later figure out how to properly address the above issue, or allow
users who might want to benefit from BTCFI enforcement and won't use
Concurrency. To do this, condition the existing BTCFI flag enforcement
into a configuration option that defaults to off for now.

Because the new swift-driver needs to "know" whether the frontend is
configured to opt-out or not, and since the new driver communicates with
the frontend via the target info JSON to begin with, we add a field
that emits the build flavor to signal the right behavior.
2025-03-29 10:47:23 -04:00
Saleem Abdulrasool
78a2057934 utils: extract Build-SDK helper
This creates a helper for building the SDK for a given OS/Architecture.
The building of the SDK should be uniform and this ensures that we can
maintain that uniformity.

This also highlights any structural changes that are being adjusted
manually. The desire is to bring this to zero by gaining control over
the install rules.
2025-03-28 20:28:22 -07:00
Saleem Abdulrasool
f3329376ca Merge pull request #80341 from compnerd/new-currency
utils: enable swift_Concurrency on the new build
2025-03-28 13:47:35 -07:00
Jeff
4f8af6cc9c utils: Breakup Build-Compilers into Build- and Test- steps. 2025-03-27 18:27:40 -07:00
Saleem Abdulrasool
d644044c1c Merge pull request #80336 from jeffdav/win-build-summary-sort
utils: Fix build.ps1 summary sorting.
2025-03-27 13:26:05 -07:00
Saleem Abdulrasool
075b973f98 utils: enable swift_Concurrency on the new build
Enable the Concurrency runtime for the experimental runtime builds on
Windows. This is required to enable the use of the static runtime to
bootstrap the early swift-driver.
2025-03-27 08:31:45 -07:00
Jeff
92b0849a56 utils: Fix build.ps1 summary sorting. 2025-03-26 22:02:42 -07:00
Saleem Abdulrasool
f042eb8755 Merge pull request #80323 from jeffdav/win-build-fix-android-os-enum-refs
utils: Fix Android OS enum usage in function params.
2025-03-26 20:05:39 -07:00
Jeff
f863570499 utils: Fix Android OS enum usage in function params. 2025-03-26 15:21:24 -07:00
Max Desiatov
eb1a2960b6 Enable _Concurrency for Embedded Swift with WASI (#79292)
WASI with Embedded Swift provides WASI-libc and libc++ headers necessary to build the `_Concurrency` module for Wasm. We now add `wasm32-unknown-wasip1-wasm` triple to `EMBEDDED_STDLIB_TARGET_TRIPLES` when `SWIFT_WASI_SYSROOT_PATH` is set, which builds the necessary stdlib slice.

---------

Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
2025-03-26 21:14:05 +00:00
Jeff
828a3470e8 utils: Add back missing ToolchainInstallRoot properties. 2025-03-25 21:43:36 -07:00
Evan Wilde
521e2f66b2 Merge pull request #80276 from etcwilde/ewilde/build-cmake-before-ninja
[build-script] Build CMake before Ninja
2025-03-25 15:22:40 -07:00
Evan Wilde
813ed210b3 [build-script] Build CMake before Ninja
Ninja requires CMake 3.15 or newer to build, while the CMake on Amazon
Linux 2 is only 2.8. We bootstrap a newer CMake anyway, so build it
before Ninja so that Ninja has a new enough CMake.
2025-03-25 10:23:47 -07:00
Saleem Abdulrasool
0819b437ef Merge pull request #80181 from jeffdav/win-build-platforms
utils: Convert build.ps1 to use Platform definitions.
2025-03-25 08:28:45 -07:00
Jeff
f3c95329bc PR Feedback. 2025-03-24 13:28:44 -07:00
Evan Wilde
321c8208f5 [build-script] Create time log dir
If the directory where the build time log is supposed to go doesn't
exist, create it. The append file mode will create files, but won't
create directories. When we start building ninja, we haven't necessary
created the build directory yet, so this results in an error about the
missing directory when writing the build time log.
2025-03-24 08:33:35 -07:00
Evan Wilde
bbd412b0dc Revert "[build-script] Remove ninja build time tracking"
This reverts commit fb4799f5d1.
2025-03-24 08:30:29 -07:00
Evan Wilde
fb4799f5d1 [build-script] Remove ninja build time tracking
Logging the build time is failing because the build log time file
doesn't always exist by the time Ninja is getting brought up.
2025-03-24 08:09:11 -07:00
Jeff
498f8f7909 Add fixme. 2025-03-21 11:05:15 -07:00
Jeff
dd6f1c29b3 Fix missing param. 2025-03-21 10:18:44 -07:00
Mishal Shah
deb1d9696d Merge pull request #80199 from etcwilde/ewilde/remove-ninja-host
[build-script] Remove ninja host
2025-03-21 09:43:50 -07:00
Evan Wilde
bafbfa2d46 [build-script] Remove ninja host
The ninja builder took a host argument that was unused by the function.
The ninja build failed to pass this argument, resulting in
an execution failure. Removing the argument.
2025-03-21 08:55:19 -07:00
Jeff
b150d4c94e PR Feedback 2. 2025-03-20 21:57:27 -07:00
Jeff
3daeb9c7b9 PR Feedback. 2025-03-20 17:08:41 -07:00
Jeff
643f904353 utils: Handle additional args to Invoke-BuildStep in build.ps1. 2025-03-20 15:17:27 -07:00
Jeff
ad744421fd utils: Convert build.ps1 to use Platform definitions. 2025-03-20 15:17:25 -07:00
Saleem Abdulrasool
1289c9614e Merge pull request #80092 from compnerd/versioning
utils: version testing frameworks
2025-03-20 10:20:40 -07:00
Saleem Abdulrasool
1e74bdffa0 Merge branch 'main' into timing 2025-03-19 22:28:46 -07:00