Commit Graph

9448 Commits

Author SHA1 Message Date
Anton Korobeynikov 5b0746f967 Fix two Wasm test harness issues and re-enable more autodiff tests (#86931)
- Correctly construct cmake cmdline for wasmstdlib including cmake common host options. This is required in order to include e.g. `CMAKE_OSX_SYSROOT` on macOS, etc.
 - Ensure we're passing path to newly-built SDK to sil-opt

This makes almost every AutoDiff tests passing for Wasm target (the only exception is `AutoDiff/validation-test/always_emit_into_client/multi_module_struct_no_jvp.swift` as `expectCrash()` is not working properly on Wasm.
2026-02-09 19:15:52 -08:00
Saleem Abdulrasool efa895e1ae Merge pull request #86823 from compnerd/boring
update_checkout: add boringssl to the checkout set
2026-02-09 18:57:04 -08:00
Evan Wilde 6db7c6ced8 Merge pull request #86989 from etcwilde/ewilde/llvm-nm-resilience
Testing: Resilience testing with `llvm-nm`
2026-02-09 09:19:59 -08:00
Charles Zablit cae479d731 Merge pull request #86977 from charles-zablit/charles-zablit/update-checkout/add-commit-hash-support
[update-checkout] fix error when running --skip-history with commit hash
2026-02-09 15:02:47 +01:00
Evan Wilde f23637a882 utils/rth: decode bytes
The object returned by a failing command invocation is a bytes object,
which cannot be concatenated with a string directly. Decode it and split
it to make the missing symbol list clearer.
2026-02-06 16:52:47 -08:00
Alastair Houghton e38c0652b6 Merge pull request #84906 from al45tair/eng/PR-101623384
[Backtracing] Add initial support for Windows.
2026-02-06 14:53:16 +00:00
Alastair Houghton 079c1657ae [Backtracing] Fix the new build system for Windows.
We needed to add the `Runtime` module to the new build system, but
when I tried doing that, various things broke.

Firstly, we ended up with two targets with the name `swiftRuntime`,
but only in the static build (because in that build, everything
gets pulled in together, so CMake sees both of them).  Rename the
one that's part of `swiftCore` to `swiftRuntimeCore`.

Second, we need some extra paths for the `Cxx` module and its
submodules, and since those are part of the `INTERFACE`, we need
to make sure we `PUBLIC` link them into the `Cxx` module so that
they get passed through when building `swiftRuntime`.

rdar://101623384
2026-02-06 08:53:16 +00:00
Michael Gottesman e63e4c7c08 Merge pull request #87012 from gottesmm/pr-086d30207a101fc2cc2c9428d35770baaebc36d7
[sil-mode] Fix syntax highlighting.
2026-02-05 18:04:26 -08:00
Michael Gottesman ad8c6a0dfd [sil-mode] Fix syntax highlighting.
I noticed that my syntax highlighting started to fail. Turns out it was due to
not setting font-lock-mode to 1.
2026-02-05 13:13:13 -08:00
Charles Zablit d702ba6481 Merge pull request #86959 from charles-zablit/charles-zablit/windows/link-jobs-params
[windows] lower the number of parallel link jobs when building with DebugInfo
2026-02-05 13:01:15 +00:00
Charles Zablit e5d6339cbb [update-checkout] fix error when running --skip-history with commit hash 2026-02-04 13:16:58 +00:00
Kavon Farvardin 006a0a494a Reparenting: require an extension
This change forces you to write ``@reparented` relationships
on an extension of a protocol, rather than on the protocol
itself.

The ProtocolConformance needs to be associated with some
GenericContext and IRGen expects it to be an ExtensionDecl.
That environment defines under what conditions the conformance
exists. We also need to define witnesses for the new parent's
requirements in an extension anyway, so it's a natural fit.

The previous workaround for this was kind of awful, as it'd
require searching all the protocol's extensions and "guess"
which extension they want to represent the conformance. While
we could try to synthesize an extension, there's two
challenges there:

1. Due to SuppressedAssociatedTypes, it's not so simple to
synthesize an unconstrained ExtensionDecl.
2. We currently rely on same-type requirements to pin the
associated types to particular witnesses of those requirements
in the extension. So it's not purely unconstrained! For example,

```
extension Seq: @reparented BorrowSeq where Iter == MyIter {}
```

The constraints that are disallowed (but not yet diagnosed)
are conditional conformance requirements, as the default
conformance for a reparenting cannot depend on those.

Thus, it's better that programmers to specify the extension.
2026-02-03 16:40:21 -08:00
Kavon Farvardin 741089b849 utils: add --skip-application-back-deploy to rth
This mode was effectively removed from `rth`
in ba04d49 because it was unused. I do need this
to exclude the before_after scenario, which is
linking a newer app with an older library.
2026-02-03 16:39:19 -08:00
Alastair Houghton 6d930d39ec [Backtracing] Make tests work, plus various fixes.
Made the tests run, then fixed various issues with them.

rdar://101623384
2026-02-03 18:23:29 +00:00
Alastair Houghton 90ac30a78e [Backtracing][Tests] Enable more tests on Windows.
We should run the backtracer's crash tests as well, now that is
supported.

rdar://101623384
2026-02-03 18:23:29 +00:00
Alastair Houghton 4f90a96640 [Backtracing][Windows] Fix things to install swift-backtrace
We needed to modify `build.ps1` to copy `swift-backtrace.exe` into
position.  Also tidy up the code in `AddSwiftStdlib.cmake`.

rdar://101623384
2026-02-03 18:23:29 +00:00
Alastair Houghton 3463b1e145 [Backtracing] Disable backtracing for 32-bit Windows.
Right now, the backtracer won't work on 32-bit Windows because we
aren't properly dealing with the `stdcall` calling convention on
the Win32 API calls.

rdar://101623384
2026-02-03 18:23:29 +00:00
Alastair Houghton e0845e1483 [Backtracing] Made on-crash backtraces work for 64-bit.
On-crash backtracing is basically there for 64-bit Windows.  It
won't work on 32-bit because of a Swift compiler issue, and there
is a little more work to do yet, but it is now working!

rdar://101623384
2026-02-03 18:23:29 +00:00
Alastair Houghton d13988bd5f [Backtracing][Windows] Initial Windows support.
This doesn't have a working symbolicator yet, but it does build and
it can obtain a basic backtrace.

It also doesn't include a working `swift-backtrace` program yet.

rdar://101623384
2026-02-03 18:23:29 +00:00
Charles Zablit 4838c578d6 [windows] lower the number of parallel link jobs when building with DebugInfo 2026-02-03 17:25:30 +00:00
Saleem Abdulrasool 7bda989605 update_checkout: add boringssl to the checkout set
This library dependency is already present in the Android SDK builds.
Replicate the dependency in the checkouts to allow building for the
Android SDK on non-Linux platforms.
2026-02-02 14:02:00 -08:00
finagolfin 0546ff3de1 build.ps1: Revert the Testing portion of #86577 (#86921)
This flag appears to be needed to cross-compile Testing for Android,
otherwise it can't find Dispatch.
2026-02-01 11:08:36 -08:00
Hamish Knight 47cdbb9b37 [crash-reduce] Allow specific frontend args 2026-01-29 22:26:51 +00:00
Hamish Knight 29798286ce [crash-reduce] Avoid moving inputs if deletion is disabled 2026-01-29 22:26:51 +00:00
Hamish Knight 666d1c191c [swift-dev-utils] Sink CommandArgumentParser into Utils 2026-01-29 22:26:51 +00:00
Saleem Abdulrasool 7e6cb7b82c Merge pull request #86577 from Steelskin/fabrice/utils-build-ps1-remove-duplicate-args
utils: Remove duplicate arguments in build.ps1
2026-01-29 09:49:13 -08:00
Charles Zablit 3eab02966d Merge pull request #86715 from charles-zablit/charles-zablit/update-checkout/git-config-warnings 2026-01-28 22:28:24 +00:00
Charles Zablit e9f413aa46 [update-checkout] force cloning with 'core.autoclrf=false' and 'core.symlinks=true' 2026-01-28 17:25:31 +00:00
Saleem Abdulrasool c2feb68231 Merge pull request #86830 from compnerd/batchless
utils: remove `-ToBatch` from `build.ps1`
2026-01-28 08:33:56 -08:00
Saleem Abdulrasool 7bbe18bc71 utils: remove -ToBatch from build.ps1
While this functionality is extremely useful and can speed up
development iteration, it has not been well-maintained. Impose a
developer tax until we can figure out how to ensure that this path is
well maintained.
2026-01-27 12:42:48 -08:00
eeckstein d01f9da13b Merge pull request #86788 from eeckstein/check-incremental-2
CSE/check_incremental: add some more logging to detect non-determinisms in CSE
2026-01-27 12:42:53 +01:00
Eric Miotto c0c20f58e8 Merge pull request #86755 from edymtt/edymtt/point-build-script-to-the-correct-early-swift-driver
build-script: use the overall build variant to find early swift driver
2026-01-26 10:26:41 -08:00
Erik Eckstein 903142d7cf CSE/check_incremental: add some more logging to detect non-determinisms in CSE 2026-01-26 15:43:49 +01:00
Hamish Knight dd2493998d [utils] Introduce crash-reduce
This is the tool I've been using to add the fuzzer crasher test cases
to the repo.
2026-01-25 21:54:48 +00:00
eeckstein 19b52bd3b7 Merge pull request #86748 from eeckstein/check_incremental
check_incremental: better diagnostics for non-determinism checks
2026-01-24 03:30:48 +01:00
Max Desiatov 22e68a3aff test/DebugInfo: enable all available tests for Wasm (#86742)
Wasm is the only 32-bit platform regularly tested on Swift CI, let's enable existing `DebugInfo` tests for it.
2026-01-23 17:36:20 -08:00
Saleem Abdulrasool 5d0ff1688d Revert "update-checkout: bump libcurl to 8.17.0 (#86321)"
This reverts commit 1eaa52efdc.

build.ps1 was not synchronised with the CURL configuration changes. This
silently changes what is exactly specified to build (options were
renamed/replaced/removed/added).
2026-01-23 16:08:53 -08:00
Rintaro Ishizaki cbb97ea715 Revert "utils: update configuration for curl" 2026-01-23 15:32:42 -08:00
Eric Miotto bf35deaddf build-script: use the overall build variant to find early swift driver
The path in which the early SwiftDriver is installed depends on the
`build_variant` argument (set with `--release`, `--release-debuginfo`
and `--debug`), but build-script calculate it based off
`swift_build_variant`, which can be different from the former (e.g. when
we want to build only the compiler in debug configuration).
2026-01-23 14:28:23 -08:00
Erik Eckstein 42d67ce169 check-incremental: print the MD5 hashes of SIL after each SIL pass to find a non-deterministic pass 2026-01-23 19:20:20 +01:00
finagolfin f24d72aa6c [test] Fix building Android tests on Windows toolchain CI (#86694)
Ever since #84574 added Android availability versioning, the Reflection
test stopped building for Android unless the API level was in the target
triple, so [we hacked that into CMake in that
pull](https://github.com/swiftlang/swift/pull/84574/files#diff-e2e2a250882f66d531f2a42c201e013fa2d8be892b2880a32d6596710761f470R2549),
but the Windows CI does not pass in `SWIFT_ANDROID_API_LEVEL`, [like
`build-script`
does](https://github.com/swiftlang/swift/blob/9143271dfdc92053a7b9d95000d9fd60e42413c3/utils/build-script-impl#L1632),
so pass it in here.
2026-01-23 16:32:29 +05:30
Saleem Abdulrasool f460c3066f utils: update configuration for curl
Update the curl configuration invocation to match the latest release.
This adds the missing flags and removes the flags which were dropped
upstream to ensure that we are able to identify the configuration.

This now demonstrates that we are missing PSL support which is enabled
by default upstream.
2026-01-22 13:22:08 -08:00
Charles Zablit 04b29ed8c1 Revert "[update-checkout] force cloning with 'core.autoclrf=false' and 'core.symlinks=true'"
This reverts commit fd3d3d1c17.
2026-01-22 19:21:11 +00:00
Charles Zablit fd3d3d1c17 [update-checkout] force cloning with 'core.autoclrf=false' and 'core.symlinks=true' 2026-01-22 12:34:21 +00:00
Max Desiatov 46f720e5c6 Merge pull request #86657 from MaxDesiatov/wasm-autodiff-tests
wasmstdlib.py: add 'AutoDiff' to lit test paths

Follow up to https://github.com/swiftlang/swift/pull/86552 enabling tests for the newly enabled experimental feature.
2026-01-21 21:22:53 +00:00
Max Desiatov 9f35fdecbb update-checkout-config.json: bump WasmKit to 0.2.0 (#86440)
WasmKit 0.2.0 contains new functionality that allows enabling Wasm debugging tests in LLDB.

The version bump is not planned for 6.3, as Swift bootstrapping version for `release/6.3` CI jobs is too low: 5.9 as opposed to newly required Swift 6.0 in latest SwiftNIO and WasmKit versions.
2026-01-21 18:14:12 +00:00
Charles Zablit cbf1471df4 Merge pull request #86600 from charles-zablit/charles-zablit/update-checkout/exponential-retry 2026-01-21 17:13:47 +00:00
Max Desiatov 7bcd6787c9 wasmstdlib.py: add 'AutoDiff' to lit test paths
Follow up to https://github.com/swiftlang/swift/pull/86552 enabling tests for the newly enabled experimental feature.
2026-01-21 13:09:15 +00:00
Max Desiatov 4d65c89ca6 update-checkout-config.json: bump SwiftNIO to 2.92.2 (#86460)
This version bump is required to update WasmKit to 0.2.0 in a separate PR (https://github.com/swiftlang/swift/pull/86440), which itself is required to enable Wasm debugging tests in LLDB.

The version bump is not planned for 6.3, as Swift bootstrapping version for `release/6.3` CI jobs is too low: 5.9 as opposed to newly required Swift 6.0 in latest SwiftNIO and WasmKit versions.
2026-01-21 09:12:46 +00:00
Charles Zablit 668091c83f [update-checkout] add a --max-retries flag 2026-01-19 16:00:47 +01:00