Commit Graph

457 Commits

Author SHA1 Message Date
swift-ci
7eb35535da Merge remote-tracking branch 'origin/main' into rebranch 2025-09-24 08:34:30 -07:00
Saleem Abdulrasool
673d0573ad utils: remove reference to yams from unified SPM project
Remove the reference to Yams from the unified workspace as this
dependency has been removed.
2025-09-22 14:37:58 -07:00
Anthony Latsis
e1450e011e Manually merge remote-tracking branch 'origin/main' into rebranch
Conflicts:
*	utils/build_swift/build_swift/defaults.py
2025-09-04 14:07:50 +01:00
Mishal Shah
c75932b89f Merge pull request #83748 from swiftlang/bump-version-6.3
Bump the Swift version to 6.3
2025-09-03 21:18:05 -07:00
swift-ci
65e945b84d Merge remote-tracking branch 'origin/main' into rebranch 2025-08-15 17:56:33 -07:00
Alex Hoppen
7ce649c168 [Windows] Use a multiroot data file to test (corelibs-)foundation on Windows
We currently rebuild swift-syntax, swift-foundation-icu and swift-foundation twice: Once to test swift-foundation and once to test swift-corelibs-foundation. Using a unified build for both projects means that we only need to rebuild them once, saving ~5 minutes.

(cherry picked from commit 61f833c04c)
2025-08-15 12:17:43 -07:00
Mishal Shah
63ef5a0cc7 Bump the Swift version to 6.3 2025-08-14 23:06:49 -07:00
swift-ci
0dc5d3a974 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-13 09:36:22 -07:00
Alex Hoppen
b48d052f64 Revert "[Windows] Use a multiroot data file to test (corelibs-)foundation on Windows"
This reverts commit 61f833c04c.
2025-08-13 13:06:32 +02:00
swift-ci
18cdf90d50 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-12 22:56:03 -07:00
Kavon Farvardin
6cb38edad4 Merge pull request #83622 from kavon/kavon/test-opaque-values
test: provide an opaque-values testing mode
2025-08-12 19:57:57 -07:00
Kavon Farvardin
c3e0ce5bb6 test: provide an opaque-values testing mode
Introduces a new build-script flag `--test-optimize-none-with-opaque-values`
and build targets like `check-swift-optimize_none_with_opaque_values` that
runs the execution_test's while compiling them with -enable-sil-opaque-values.

This mode is quite useful while working to bring-up opaque values.
2025-08-12 15:07:40 -07:00
swift-ci
78dcb4dd45 Merge remote-tracking branch 'origin/main' into rebranch 2025-08-12 03:16:32 -07:00
Alex Hoppen
d3d8576ec4 Merge pull request #80122 from ahoppen/windows-multiroot-data-file
[Windows] Use a multiroot data file to test (corelibs-)foundation on Windows
2025-08-12 08:12:13 +02:00
Alex Hoppen
61f833c04c [Windows] Use a multiroot data file to test (corelibs-)foundation on Windows
We currently rebuild swift-syntax, swift-foundation-icu and swift-foundation twice: Once to test swift-foundation and once to test swift-corelibs-foundation. Using a unified build for both projects means that we only need to rebuild them once, saving ~5 minutes.
2025-08-11 09:35:59 +02:00
swift-ci
c08ba7749f Merge remote-tracking branch 'origin/main' into rebranch 2025-08-09 02:55:57 -07:00
finagolfin
4a3ef140d8 [build] Make the new --cross-compile-build-swift-tools flag public (#83422)
This new flag makes it easy to build Swift cross-compilation toolchains,
by disabling cross-compilation of all host tools, like the Swift
compiler and various macros, building on prior pulls #38441 and #82163.

Native compilation has more fine-grained flags like
`--build-swift-tools`, `--build-llvm`, and `--swift-testing-macros`, but
those will disable building them for _all_ platforms (with the exception
of `--build-swift-tools`, which I modified to only apply for the host,
since the initial introduction of this
`--cross-compile-build-swift-tools` flag a couple months ago), so
they're not suited for building a cross-compilation toolchain, where you
want all host tools built for the native host but not for any
cross-compilation SDKs.
2025-08-09 13:51:11 +05:30
Anthony Latsis
eaafb0ed7e Manually merge remote-tracking branch 'origin/main' into rebranch
Conflicts:
- lib/ClangImporter/ClangImporter.cpp
2025-08-05 14:24:07 +01:00
Eric Miotto
0869919eca Test: allow different deployment target versions for tests on Darwin
Currently we are using the same versions we use to build compiler and
standard library. This is an unnecessary coupling especially when
testing the generation of backdeployed executables for macOS -- here
we have interest in being able to run the tests on previous OSes, not
the compiler itself.

To support this, add new `--darwin-test-deployment-version-<platform>`
flags to build-script, which by default take the same value as the
matching `--darwin-deployment-version-<platform>` ones.

Addresses rdar://156724078
2025-07-31 08:19:13 -07:00
Ben Barham
7c43a3ad92 Merge pull request #83417 from bnbarham/bump-clang-to-21
Bump clang to 21.0.0 to match 21.x
2025-07-30 11:00:10 -07:00
Ben Barham
7568436079 Bump clang to 21.0.0 to match 21.x 2025-07-29 17:56: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
c798cf0bb5 Updated expected_options and defaults in driver_arguments 2025-07-17 21:36:53 +01:00
Max Desiatov
95bbfd3406 build-script: allow --test-wasm-stdlib without --build-wasm-stdlib
This allows testing Wasm stdlib without rebuilding WASI sysroot and stdlib, while some changes are still detected by ninja as dependencies and are rebuilt, which is great for local incremental builds.
2025-07-17 17:46:01 +01:00
Max Desiatov
0b7f21e997 Update expected_options.py for --install-wasmkit 2025-07-08 14:44:44 +01:00
Max Desiatov
5451c3615d Remove ad-hoc adjustment in driver_arguments.py 2025-07-08 11:18:47 +01:00
Max Desiatov
407bbb6bc0 build-script: Add --install-wasmkit option
This allows skipping the installation step and only building WasmKit, which is consistent to how other products are handled by `build-script`, where they have separate `--install` options. Existing behavior is preserved, where passing `--wasmkit` alone will install it, but now `--wasmkit --install-wasmkit false` will skip its installation step.
2025-07-08 10:22:39 +01:00
Eric Miotto
1218df3f4e Wire --llvm-include-tests in build-script
This was apparently missing in the migration of the llvm product
from build-script-impl to build-script,
2025-06-16 15:01:52 -07:00
Eric Miotto
b7f8eb7480 build-script: Remove support for legacy way of building compiler-rt
Addresses rdar://149293315
2025-06-11 14:39:05 -07:00
Alastair Houghton
d5ed335339 Merge pull request #81440 from al45tair/currentos-availability
[Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
2025-06-03 15:01:22 +01:00
Alastair Houghton
28f96e64ab [Concurrency][Stdlib] Add SwiftStdlibCurrentOS availability, use it.
If you use SwiftStdlibCurrentOS availability, you will be able to
use new types and functions from within the implementation. This
works by, when appropriate, building with the CurrentOS availability
set to the current deployment target.

rdar://150944675
2025-05-12 12:07:24 +01:00
Evan Wilde
6ad5c40caa Merge pull request #81364 from etcwilde/ewilde/extend-swift-cmake-options
[Build-Script]: Extend Swift cmake options
2025-05-09 09:07:48 -07:00
finagolfin
e76b97e2b7 [build-script] Add an option to build the Foundation tests in another mode (#78390)
Use it in the linux CI presets to set them to Debug mode and speed up
the linux CI, plus add a new preset which keeps building them in Release
mode.

I was looking at a passing linux CI run and saw the log timings at the
end: it takes [longer to build and test the swift-foundation repos than
to compile all 7k+ mostly C++ files in
LLVM](https://ci.swift.org/job/swift-PR-Linux/18996/console)!
```
--- Build Script Analyzer ---
Build Script Log: /home/build-user/build/.build_script_log
Build Percentage 	 Build Duration (sec) 	 Build Phase
================ 	 ==================== 	 ===========
9.2%              	 1132.94               	 Running tests for foundationtests
9.1%              	 1120.57               	 linux-x86_64-swift-build
9.0%              	 1104.2                	 Building llvm
7.2%              	 878.84                	 Running tests for swiftfoundationtests
6.5%              	 796.81                	 Running tests for swiftpm
5.6%              	 684.7                 	 Building swiftpm
5.5%              	 667.92                	 linux-x86_64-swift-test
4.9%              	 597.64
```
Looking at the log, building swift-foundation in release mode takes a
long time, so let's see if changing it to debug mode helps. Some
background - the Foundation repos are built twice on the linux CI: once
by CMake, which is the version installed in the toolchain, then a second
time by SwiftPM purely for testing.

This pull only affects that second SwiftPM build for testing, which is
not shipped in the final toolchain but thrown away.
2025-05-09 21:07:01 +05:30
Evan Wilde
004a738c70 [Build-Script]: Extend Swift cmake options
The existing swift-cmake-options flag overwrites all flags computed by
build-script. Sometimes it is useful to be able to append additional
CMake flags without overwriting the existing flags.
This patch adds `--extra-swift-cmake-options` that adds the specified
flags to the Swift CMake configuration instead of overwriting them.

This also adds a similar `--extra-llvm-cmake-options`, which adds the
new flags to the end, allowing one to replace and overwrite CMake flags
that build-script computed.
Due to the parameter passing mechanisms in build-script-impl, while this
behavior would be useful for Swift, it is not immediately apparent how
one would best implement this at this time.
2025-05-07 14:49:45 -07:00
Eric Miotto
26bdff8fe5 Merge pull request #80253 from edymtt/edymtt/use-runtimes-build-quater-enabled-by-default
Use LLVM_USE_RUNTIMES to build compiler-rt by default
2025-04-30 12:05:13 -07:00
Evan Wilde
838d69f0f4 Build Swift Testing: Add build_subdir
Adding a build_subdir preset default for the stage 0 and stage 1 build
configurations.
2025-04-25 16:18:52 -07:00
Eric Miotto
c983cac3a9 Use LLVM_ENABLE_RUNTIMES to build compiler-rt by default
Addresses rdar://113972453
2025-04-22 08:13:33 -07:00
Eric Miotto
7b001765bd Merge pull request #80174 from edymtt/edymtt/use-runtimes-build-quater
build-script: Permit to build compiler-rt with `LLVM_ENABLE_RUNTIMES`
2025-04-22 06:48:17 -07:00
Eric Miotto
0c8171f53c build-script: Permit to build compiler-rt with LLVM_ENABLE_RUNTIMES
LLVM-21 plans to remove the legacy method for building compiler-rt
in the same invocation as LLVM using `LLVM_ENABLED_PROJECTS` and
`LLVM_BUILD_EXTERNAL_COMPILER_RT`.

Support the new way of building compiler-rt with a new build-script
opt-in flag `--llvm-build-compiler-rt-with-use-runtimes` --
this will allow a staged introduction, and will ensure we can revert
back to the old behaviour temporarily in case of unforeseen regression.

Since this flag is meant to be short lived, in an attempt to keep the
logic simple we are gating on it only the
CMake cache entries that strictly control the compilation mode, all the
other entries used for configuring are added in both modes.

Take this chance to remove some stale code from `build-script-impl`, and
move some code in the generic CMake product to the LLVM one.

Addresses rdar://147505298
2025-03-31 13:53:08 -07:00
Evan Wilde
9402a1689b Automatically choose a built ninja
Instead of using `--build-ninja` to decide to build ninja, build it
automatically if a sufficiently new enough version is not available.
Also record the build time taken to build the local Ninja so that we can
see how much time we would save by stashing a pre-built Ninja in CI.
2025-03-19 07:35:32 -07:00
Michael Gottesman
243cfe0719 Merge pull request #79804 from gottesmm/pr-f26aec536f9d333150b49e0faf50a70a9a26ac53
Add a flag to enable-new-runtime-build that enables the new runtime build
2025-03-07 16:03:49 -08:00
Alex Hoppen
67f312cc2f Merge pull request #79834 from ahoppen/remove-syntax-lint
[build-script] Remove option to lint swift-syntax
2025-03-07 06:42:29 -08:00
Alex Hoppen
7256a92775 [build-script] Remove option to lint swift-syntax
This is being verified by GitHub Actions now as of https://github.com/swiftlang/swift-syntax/pull/2998.
2025-03-06 18:38:47 -08:00
Michael Gottesman
7418b42215 Add a flag to enable-new-runtime-build that enables the new runtime build.
What is nice about this is that by not using extra-cmake-args, we can avoid
passing this into LLVM as well when attempting to reproduce failures on the bots
(thus avoiding having to rebuild LLVM as well).
2025-03-05 14:10:26 -08:00
Michael Gottesman
f68e23aaf1 Merge pull request #79329 from gottesmm/pr-295dfc37ee8e5bf71b1249c2717a30c37de1aee2
[build-script] Add an option to force the linker used.
2025-02-14 21:09:09 -08:00
Michael Gottesman
3e2a6f6665 [build-script] Add an option to force the linker used.
I have been doing this using extra-cmake-args/etc... just feels better to have
an actual option to do this.

Just did this quickly while waiting for my Linux build to finish that uses
extra-cmake-args to set the linker.
2025-02-12 11:49:01 -08:00
Hamish Knight
d260bd8ddb [build-script] Remove Xcode generation support
This was quite brittle and has now been superseded
by swift-xcodegen. Remove the CMake/build-script
logic for it, leaving the option behind to inform
users to switch to using xcodegen instead.
2025-02-12 12:19:21 +00:00
Cyndy Ishida
3232df4d67 Reapply '[BuildSystem] Stop building for i386-watch-simulator (#77692)' (#79018)
* Reapply '[BuildSystem] Stop building for i386-watch-simulator (#77692)'

    * [BuildSystem] Stop building for i386-watch-simulator

    In Xcode16 it is not supported.

This initially broke client projects who were still building the legacy
architecture but now that's resolved.
2025-01-31 15:04:28 -08:00
Alastair Houghton
ca233af1ea [Backtracing] Fix Python test failure.
We needed to add `--enable-runtime-module` in the Python test scripts.

rdar://124913332
2025-01-21 19:02:47 +00:00
Alastair Houghton
760cc57bef [Backtracing] Rename _Backtracing to Runtime.
Move the backtracing code into a new Runtime module.  This means renaming
the Swift Runtime's CMake target because otherwise there will be a name
clash.

rdar://124913332
2025-01-17 10:09:36 +00:00