Commit Graph

8992 Commits

Author SHA1 Message Date
Anthony Latsis
b09b622078 Merge pull request #82358 from AnthonyLatsis/no-warnings-asserts
[presets] Actually make https://github.com/swiftlang/swift/pull/81284 work
2025-07-31 07:02:11 +01:00
Saleem Abdulrasool
ac287123c9 build.ps1: annotate some cleanup work
Mark the associated issue tracking the clean up of the additional flags
that we are required to currently pass.
2025-07-30 17:43:54 -07:00
Saleem Abdulrasool
8d71ac5a8f build.ps1: remove CMake_Swift_COMPILER_TARGET specification
Avoid passing this from the individual repositories that we build as
part of the runtime. This flag is automatically computed as part of
`Build-CMakeProject`.
2025-07-30 17:43:24 -07:00
Saleem Abdulrasool
590b6a47c3 update_checkout: add swift-subprocess to the checkout set
Add swift-subprocess to the checkout set so that we can start
investigating building that for integration into swift-build.

Co-authored-by: Tina L <49205802+itingliu@users.noreply.github.com>
2025-07-30 17:35:04 -07:00
Saleem Abdulrasool
d4b28a4e65 Merge pull request #83383 from compnerd/required-sdk
build.ps1: clean up `-SwiftSDK` handling
2025-07-30 16:16:10 -07:00
Saleem Abdulrasool
da55089766 Merge pull request #83419 from compnerd/simplify
build.ps1: some minor simplifications
2025-07-30 15:55:41 -07:00
Saleem Abdulrasool
b62ee7644e Merge pull request #83409 from Steelskin/fabrice/unset-android-c-cxx-compilers
utils: Do not set the Android C/C++ compilers
2025-07-30 09:44:45 -07:00
Saleem Abdulrasool
eb7e7b1311 build.ps1: make -SwiftSDK required for Swift
If Swift is being used, the client should always specify `-SwiftSDK` to
ensure that the right version is being taken always. This will ensure
that we build the runtime properly going forward.
2025-07-30 08:16:36 -07:00
Max Desiatov
a47d39215d [NFC] build-script: add argparse.Namespace type annotation (#83376) 2025-07-30 06:08:08 -07:00
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
Christopher Thielen
4148357b9a Merge pull request #83310 from cthielen/cthielen/swift-collections-version-update
Bump swift-collections version to 1.1.6 for swift-foundation
2025-07-29 20:54:41 -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
Anthony Latsis
e99f3e887e [presets] Actually make https://github.com/swiftlang/swift/pull/81284 work 2025-07-29 22:02:28 +01: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
Marc Prud'hommeaux
663ec9340d Support 16 KB page sizes on Android (#81596)
Android 15+ requires that native libraries be compiled with a linker
flag to support 16 KB page sizes. See:
https://developer.android.com/guide/practices/page-sizes#compile-r26-lower
2025-07-29 20:42:22 +05:30
Michael Gottesman
6b2db34d24 Merge pull request #83335 from gottesmm/pr-6683b32974d47cc3fe1d808bb0139ee945538c76
[swift-snapshot-tool] Two small improvements to the README.md
2025-07-28 16:16:59 -07:00
Saleem Abdulrasool
8803d8359c Merge pull request #83278 from compnerd/differentiation
utils: build Differentiation in the experimental SDK
2025-07-28 10:32:47 -07:00
Yuta Saito
dd6eb62d65 [wasm] Fix installation paths for libxml2.a
Clang driver only passes arch-specific library paths as search paths
to the linker for WebAssembly targets but we were installing
libxml2.a under `<sysroot>/lib` without the multiarch triple. It led
to the linker not finding libxml2.a when importing FoundationXML
2025-07-27 10:37:04 +00:00
Christopher Thielen
cc7ae7bc34 Bump swift-collections version to 1.1.6 for swift-foundation 2025-07-26 19:17:14 -07:00
Max Desiatov
db7bd86305 update-checkout-config.json: check out CMake on Darwin and Linux (#83296)
Due to issues with CMake 4.0, it should be always checked out on macOS to build a compatible version.
2025-07-26 10:13:08 +01: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
Michael Gottesman
f7251e5fbc [swift-snapshot-tool] Add to the README a helper blurb about how to run tests against Swift Testing
Swift Testing is in the downloadable toolchains but is not in the normal library
lookup path, so one needs to specify it explicitly with a -I command so it is
found by the test command.
2025-07-25 10:50:55 -07:00
Michael Gottesman
6b21ff89f3 [swift-snapshot-tool] Fix the description in the README of branch specification to match how we do it today.
Today one uses --development, --release_5_0, --release_6_0, --release_6_2, etc
instead of previously how we specify it.
2025-07-25 10:50:55 -07:00
Saleem Abdulrasool
0334abdc9f Merge pull request #83307 from mhegazy/build-mimalloc-before-asserts
[build.ps1] Make sure mimalloc is built before we build noasserts toolchain
2025-07-25 08:30:43 -07:00
Max Desiatov
c447bf5283 utils: add typing annotations to migration.py/utils.py (#83293)
These typing annotations are supported since Python 3.6, while the oldest Python we have to support is 3.7 on Amazon Linux 2.
2025-07-24 12:32:14 -07:00
Max Desiatov
15ceabc660 test/CMakeLists.txt: fix --lit-args unhandled in Wasm tests (#83285)
Due to the fact that Wasm testing targets are configured by Python `build-script` unlike `build-script-impl` for the rest of testing targets, `--lit-args` value was ignored and not recorded in these targets. These are configured as `LLVM_LIT_ARGS` in CMake.

Let's assign the `LLVM_LIT_ARGS` configuration value in Python `build-script` to handle `--lit-args` consistently for all testing targets.
2025-07-24 12:26:25 -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
Evan Wilde
fa88da6e90 Merge pull request #83263 from Steelskin/fabrice/swift-cryto-update-3-12-5
build: Update swift-crypto 3.12.3 -> 3.12.5
2025-07-23 17:09:53 -07:00
Max Desiatov
ea6ca2b5db Merge pull request #83128 from MaxDesiatov/maxd/run-embedded-tests
test/CMakeLists.txt: run Embedded Swift for Wasm tests

Run new `check-swift-embedded-wasi` target from `test/CMakeLists.txt`, tweak `lit.cfg` to support WASI Clang resource dir, exclude unsupported tests based on `CPU=wasm32` instead of `OS=wasi`.
2025-07-24 01:06:08 +01:00
Michael Gottesman
d3b4817364 Merge pull request #83180 from gottesmm/pr-e03ea1febe6d8f6d5a98b40321698d1ea1d7c8ca
[swift-snapshot-tool] Make computing the branch name part of the download url more flexible so it works for release branches.
2025-07-23 14:23:01 -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
Max Desiatov
9b23c08008 wasmstdlib.py: embedded stdlib not built for threads, exclude its tests 2025-07-23 14:32:54 +01:00
Max Desiatov
03f7ebc890 test/CMakeLists.txt: run Embedded Swift for Wasm tests
Run new `check-swift-embedded-wasi` target from `test/CMakeLists.txt`, tweak `lit.cfg` to support both `-wasi` and `-wasip1` triples, exclude unsupported tests based on `CPU=wasm32` instead of `OS=wasi`.
2025-07-23 10:10:47 +01:00
Ian Anderson
3a78559408 [utils] Add swift-api-digester arguments to split-cmdline
Add -typecheck-module-from-interface arguments.
2025-07-22 16:54:28 -07:00
Ian Anderson
57b63fd6cb Merge pull request #83217 from ian-twilightcoder/split-cmdline_swift-api-digester
[utils] Add swift-api-digester arguments to split-cmdline
2025-07-22 10:13:45 -07:00
Max Desiatov
c535723b05 Merge pull request #83208 from MaxDesiatov/wasm-corelibs-host-compiler
wasmswiftsdk.py: consistently apply `build_runtime_with_host_compiler`

Following up on https://github.com/swiftlang/swift/pull/83134 https://github.com/swiftlang/swift/pull/82949 https://github.com/swiftlang/swift/pull/82946 https://github.com/swiftlang/swift/pull/82944.

With these changes I'm able to quickly build and test only Wasm Swift SDK without rebuilding the whole toolchain when latest development snapshot is installed, using this invocation:

```
./swift/utils/build-script --skip-build-benchmarks --release --skip-early-swift-driver \
  --skip-build-lldb --skip-build-cmark --skip-build-llvm --skip-build-swift \
  --build-runtime-with-host-compiler --build-wasm-stdlib 
```

Timing on M4 MacBook Pro:

```
--- Build Script Analyzer ---
Build Percentage         Build Duration (sec)    Build Phase
================         ====================    ===========
43.6%                    257.75                  Building wasmswiftsdk
20.6%                    121.91                  Building wasmthreadsstdlib
20.6%                    121.78                  Building wasmstdlib
5.4%                     32.03                   Building wasmllvmruntimelibs
3.6%                     21.39                   Running tests for wasmthreadsstdlib
3.5%                     20.91                   Running tests for wasmstdlib
2.7%                     15.74                   Building wasilibc
0.0%                     0.04                    macosx-arm64-extractsymbols
0.0%                     0.04                    macosx-arm64-package
0.0%                     0.03                    merged-hosts-lipo-core
0.0%                     0.03                    merged-hosts-lipo
Total Duration: 591.65 seconds (9m 51s)
```
2025-07-22 17:24:27 +01:00
Max Desiatov
8506af7cb4 build-presets: install llvm-nm on Linux as on all other platforms (#83228)
Follow up to https://github.com/swiftlang/swift/pull/82945 that makes `llvm-nm` installation consistent on all platforms.
2025-07-22 08:38:40 -07:00
Ian Anderson
f671e0b48f [utils] Add swift-api-digester arguments to split-cmdline
Add a couple of common swift-api-digester arguments.
2025-07-21 14:31:06 -07:00