Commit Graph

9283 Commits

Author SHA1 Message Date
Leonard Grey
c7d25318c6 build.ps1: fix toolchain name trimming for arm64 2025-11-12 16:27:48 -05:00
Henrik G. Olsson
65d5425955 Merge pull request #85400 from hnrklssn/update-verify-tests-litplugin
[utils] integrate update-verify-tests with lit's --update-tests
2025-11-12 18:03:33 +00:00
Henrik G. Olsson
5db7926e09 [utils] add support for expected-remarks to update-verify-tests.py 2025-11-11 16:35:00 -08:00
Henrik G. Olsson
c246140d7f [utils] remove trailing whitespace after removing diag 2025-11-11 16:34:59 -08:00
Henrik G. Olsson
4d5844b723 [utils] only steal 1 diagnostic
This fixes a bug in the diagnostic stealing logic when multiple
diagnostics target the same line, which would trigger an assert.
2025-11-11 16:34:59 -08:00
Henrik G. Olsson
4af20b25d5 [utils] fix bug in diagnostic stealing logic
When replacing expected diagnostic content, we should consider
expected diagnostics targeting the same target, not targeting the line
the expected diagnostic is on.
2025-11-11 16:34:55 -08:00
Henrik G. Olsson
38620d49b1 [utils] integrate update-verify-tests with lit's --update-tests
This adds a lit plugin wrapping the core of update-verify-tests. When
lit is invoked with --update-tests it will call the plugin, which checks
if the failure is due to a -verify mismatch. If it is, it tries to
repair the test. If the source file was originally created by
split-file, the changes are propagated to the parent file.

No tests are added, because I don't want to run nested llvm-lit tests
in Swift's test suite, but the core functionality is tested through
update-verify-tests.py.
2025-11-11 16:33:43 -08:00
Ben Barham
3eb1beaecf Merge pull request #83993 from bnbarham/switch-foundation-configuration
Switch Windows foundation tests back to debug for PR testing
2025-11-12 10:04:25 +10:00
Henrik G. Olsson
32fd1c0dda Merge pull request #85390 from hnrklssn/update-verify-tests-continuted
[utils] add support for expected-expansion to update-verify-tests
2025-11-11 23:24:55 +00:00
Saleem Abdulrasool
cc8aacaad0 Merge pull request #85435 from swiftlang/charles-zablit/windows/fix-arm64-build
[windows] add SHA256 hash to ARM64 pinned toolchain
2025-11-11 12:49:51 -08:00
Mishal Shah
47a9524910 Add support for Swift 6.2.2 release branch scheme 2025-11-11 08:59:51 -08:00
Charles Zablit
132bff7090 [windows] add SHA256 hash to ARM64 pinned toolchain 2025-11-11 16:28:09 +01:00
Adam Ward
2fe87ca041 Bump version of swift-tools-protocols to 0.0.9
Needed downstream for this sourcekit-lsp PR https://github.com/swiftlang/sourcekit-lsp/pull/2340
2025-11-10 15:33:19 -05:00
Saleem Abdulrasool
4214842317 Merge pull request #76574 from compnerd/early-driver-win
utils: enable early swift driver on Windows
2025-11-10 09:56:35 -08:00
Evan Wilde
7801d1b9db Merge pull request #85345 from etcwilde/ewilde/freebsd-disable-libxml2-in-tools
FreeBSD: Disable libxml2 in tools
2025-11-07 16:23:44 -08:00
Henrik G. Olsson
bf46369de7 [utils] only use column for comparison when emitted
This fixes a bug that was introduced where two diagnostics on the same
line, with the same content, would be emitted separately if they
occurred on separate columns. This despite the fact that neither of
these checks specify the column when emitted. The checks are now
properly merged again.
2025-11-07 16:02:05 -08:00
Henrik G. Olsson
d71c8cc29f [utils] run the formatter on update-verify-tests (NFC) 2025-11-07 13:50:05 -08:00
Henrik G. Olsson
3891080750 [utils] add support for expected-expansion to update-verify-tests
`expected-expansion` can be a bit unergonomic to use, because it requires
pointing out not only the line, but also the column (which is not always
obvious), and the nested diagnostics have to refer to absolute lines
that aren't present in the source file. This makes both creating and
updating these test cases easier through automation.
2025-11-07 13:34:39 -08:00
Evan Wilde
b6b152eabd FreeBSD: Drop system libxml2 dep in tools
This drops the dependency on the system libxml2 from the tools shipped
in the toolchain bundle. libxml2 is disabled entirely for the LLVM/lld
build, which uses it for processing the Windows manifest files. LLDB is
changed to link against the static libxml2 built for the FoundationXML
library. This is technically incorrect since the runtime may be
cross-compiled for a different platform than what the toolchain is built
to run on, but build-script is already mixing toolchain and runtime
content in inconsistent ways, so this is no worse off than we are
already.

libxml2 is updated pretty frequently in inconsistent ways, resulting in
failures to launch due to version incompatibilities.
2025-11-07 09:57:41 -08:00
Henrik G. Olsson
27a7334a15 Merge pull request #85351 from hnrklssn/update-verify-tests
[utils] add update-verify-tests.py
2025-11-06 05:23:06 +00:00
Henrik G. Olsson
0979d340d1 [utils] update documentation for update-verify-tests
This updates the documentation to reflect the Swift port of this script,
rather than the original clang version.
2025-11-05 16:02:09 -08:00
Henrik G. Olsson
8bff12a580 [utils] port update-verify-tests to Swift's -verify
This ports clang's test suite for update-verify-tests from C to Swift,
and adjusts update-verify-tests as needed. The main differences are the
Swift -verify output format being quite different, as well as Swift's
'-verify-additional-prefix foo' working differently than clang's
'-verify=foo'.
2025-11-05 16:02:06 -08:00
Henrik G. Olsson
d629a0089a [utils] add update-verify-tests.py from clang
This script is used to automatically update test cases using -verify in
clang's test suite. Swift also has a similar -verify test functionality,
and while it can automatically fix some of them using -verify-apply-all,
this functionality only updates existing checks - it doesn't add or
remove any, and it doesn't handle newer and more complex things like
expected-expansion. Handling that type of complexity feels out of scope
to embed in the compiler, so let's copy clang's approach.

This commit adds this script as is from clang. It doesn't work at all
for Swift in its current form, as the output from Swift's -verify is
formatted differently than in clang. This will be fixed in subsequent
commits.

This could have been done by adapting the script as-is in the
llvm-project repository (since it only exists in the Swift fork, not
upstream), but tests using swift-frontend would have to reside in the
swift repo, and modifying a script in one repo with tests in a different
repo sounds like a recipe for endless CI issues.
2025-11-05 16:02:03 -08:00
Saleem Abdulrasool
909748e148 utils: enable the early swift-driver for Windows
Enable the use of the early swift-driver to build the Swift toolchain.
This is the first step towards removing the accumulated debt and
workarounds when building the toolchain on Windows.
2025-11-05 15:53:11 -08:00
Saleem Abdulrasool
acd34951de utils: build early swift-driver on Windows
This prepares the swift-driver building on Windows. By statically
linking the runtime and its dependencies, this will allow us to avoid
the runtime shuffling that is required to get the runtime required to
get the swift-driver working.
2025-11-05 15:53:10 -08:00
Saleem Abdulrasool
bfcc5b6564 utils: update toolchain snapshot to permit use of the experimental SDK
Use the experimental SDK to build the toolchain and consume the
redistributable. This is going to ensure that we build the entire
toolchain against a stable point and run against the runtime that we
build against.
2025-11-05 15:53:05 -08:00
Alex Hoppen
2dac60c94a [update-checkout] Use basename to get repo name for Git failures
`os.path.dirname` removes the last path component of a path. If there was a git failure in `~/src/swift`, this means that we show `~/src` as the repo name, which isn’t very helpful. Use `os.path.basename`, which returns the last path component, ie. `swift`.
2025-11-05 22:40:12 +01:00
John McCall
13937fdb4e Merge pull request #84528 from rjmccall/async-let-runtime-realism
Model async let begin/finish as builtins in SIL
2025-11-05 10:24:46 -08:00
Charles Zablit
4de7e8ce6e Merge pull request #85075 from charles-zablit/charles-zablit/windows/lldb-only-run-swift-test-subset
[windows] only test the Swift subset of LLDB tests in CI
2025-11-05 17:24:30 +00:00
Mishal Shah
a8c6c9628e Merge pull request #85078 from owenv/owenv/tools-protocols-windows
build.ps1: add swift-tools-protocols
2025-11-05 09:01:41 -08:00
Kavon Farvardin
98560e52f7 Merge pull request #85311 from kavon/fix-fragile-werror 2025-11-04 22:14:59 -08:00
Hiroshi Yamauchi
2d891117c4 Merge pull request #84970 from hjyamauchi/buildps1cas
Add CAS support
2025-11-04 13:16:25 -08:00
Saleem Abdulrasool
a134e44138 Merge pull request #71422 from compnerd/docc
build: setup a CMake based build for DocC
2025-11-04 10:12:09 -08:00
Kavon Farvardin
7f5dd0cb8f NFC: use -Werror flags in all Darwin tests
Running only during smoke tests mean that a PR merged with
a full test can introduce build failures.
2025-11-04 09:21:26 -08:00
John McCall
3cfda35b7c Remove the unused swift_asyncLet_{start,end,wait,wait_throwing} runtime
functions.

These were introduced in an early draft implementation of async let, but
never used by a released compiler. They are not used as symbols by any
app binaries. There's no reason to keep carrying them.

While I'm at it, dramatically improve the documentation of the remaining
async let API functions.
2025-11-03 13:45:18 -08:00
Hiroshi Yamauchi
377057db87 Add CAS support 2025-11-03 11:14:17 -08:00
Kavon Farvardin
d322b9e919 Merge pull request #85289 from charles-zablit/charles-zablit/update-checkout/fix-tuple-unpacking
[update-checkout] fix incorrect number of returned values
2025-11-03 09:48:38 -08:00
Charles Zablit
1d9b6386e9 [update-checkout] fix incorrect number of returned values 2025-11-03 17:16:55 +00:00
Hamish Knight
b0948bd6f9 [xcodegen] Remove buildable folder caveat
With the release of Xcode 26, I think it's pretty likely that folks
working on Swift will be using at least Xcode 16 now.
2025-11-01 18:03:31 +00:00
Owen Voorhees
c12d5a7b8c build.ps1: add swift-tools-protocols 2025-10-31 11:01:12 -07:00
Charles Zablit
b6ef3d81b3 [NFC][update-checkout] run the black formatter on update-checkout 2025-10-29 11:47:00 -07:00
Charles Zablit
3df36f423b [windows] only test the Swift subset of LLDB tests in CI 2025-10-28 16:40:38 -07:00
Allan Shortlidge
4eb0e959df Merge pull request #85156 from tshortli/fallthrough-warning
SIL: Fix a `-Wimplicit-fallthrough` warning
2025-10-27 21:42:53 -07:00
Saleem Abdulrasool
60440be488 build: setup a CMake based build for DocC
In local testing, this helps reduce the overall build times 7-8%. Stage
the build conversion to allow us to measure the time savings on CI
hosts.
2025-10-27 18:25:13 -07:00
Allan Shortlidge
d238bfcd9c SIL: Fix a -Wimplicit-fallthrough warning.
Warning introduced by https://github.com/swiftlang/swift/pull/85118.
2025-10-27 10:27:19 -07:00
Charles Zablit
186e76ed65 [update-checkout] pretty print the list of skipped operations 2025-10-24 17:59:37 -07:00
Charles Zablit
c0775643a3 [update-checkout] finish adding type hints 2025-10-24 17:59:35 -07:00
Charles Zablit
713ee9431d [update-checkout] add typing to git invocation exceptions 2025-10-24 16:12:50 -07:00
Mishal Shah
3595fe4984 Merge pull request #85067 from owenv/owenv/update-subprocess
Update swift-subprocess to 0.2.1
2025-10-24 00:25:02 -07:00
Slava Pestov
86e5b64807 Merge pull request #85089 from slavapestov/scale-test-seed
scale-test: Use the same seed for the RNG every time
2025-10-23 18:27:48 -04:00