Use of `--clean` can lead to irreversible loss of uncommitted data. We still need to reset Swift project repositories to a clean state, but without deleting all in-progress changes. Passing `--stash` instead of (or in addition to) `--clean` will preserve uncommitted changes in stashes of corresponding repositories.
Now that the compilation model of noncopyable types is enabled everywhere,
and one can enable the feature for specific modules, we no longer need a
separate build-script/CMake option to enable it globally. Remove it all.
We don't currently support building resilient relative protocol witness tables.
One might want to build with relative witness tables but not need
resilient protocols. Allow for that scenario.
Add a test configuration to test library-evolution + fragile resilient
protocols + relative protocol witness tables.
In several places, there was the same or similar code to either do
a symlink or use copy/copy_if_different/copy_directory in Windows
systems. The checks were also slightly different in some cases.
There is a `SWIFT_COPY_OR_SYMLINK` that can be controlled as a CMake
option, and uses `CMAKE_HOST_UNIX` as default. Change all cases that
I can find to use that value. Also create a parallel value
`SWIFT_COPY_OR_SYMLINK_DIR` to apply to directories.
There is still a couple of cases that are specific to macOS SourceKit
framework which I have left as-is, since symlinks is probably the only
right thing to do there.
There's a case for Windows specifically that uses symlinks (in
523f807694/cmake/modules/SwiftConfigureSDK.cmake (L502))
which I have not modified as well.
This change adds `llvm-ranlib` to the list of components installed into
the OSS toolchains for macOS and Linux. The `llvm-ranlib` tool is
required for WebAssembly builds because system `ranlib` usually cannot
recognize Wasm object format. `llvm-ranlib` is just a symlink to
`llvm-ar`, so extra space is not a concern.
With this build-script has a flag --enable-experimental-nonescpable-types=1
to enable this feature in stdlib.
Also we can now add // REQUIRES: nonescapable_types to tests which run only when
the compiler is built with this feature turned on.
I added the test-sourcekit-lsp command because I thought that we weren’t running sourcekit-lsp tests on the swift-syntax PR testing job (https://github.com/apple/swift/pull/72030). Then the job started failing with a TSAN failure and I thought that we would now not run sourcekit-lsp tests on the sourcekit-lsp PR testing job, so I added it there as well.
Turns out that my first assumption that we weren’t running sourcekit-lsp tests on swift-syntax PRs was wrong and the downstream failure of that was just due to racing PRs. Furthermore, the `test-sourcekit-lsp` flag doesn’t even exist. Instead, it got typo-corrected (?) to `test-sourcekit-lsp-sanitize-all`, which enabled the TSAN sanitizer on the swift-syntax and sourcekit-lsp PR testing jobs. And that caused test failures.
So, remove the `test-sourcekit-lsp` arguments again. After I made sourcekit-lsp build with strict concurrency / Swift 6 mode, I’ll re-enable TSAN on the sourcekit-lsp PR tests and fix any remaining TSAN issues.