Commit Graph

762 Commits

Author SHA1 Message Date
Max Desiatov
bac080ef70 presets: allow incremental rebuilds of stdlib for WASI (#82364)
This allows quickly rebuilding and testing wasm stdlib end-to-end without rebuilding the whole toolchain.
2025-06-22 04:04:16 -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
Andrew Kaster
bfc1031801 utils: Add llvm-symbolizer to install_components_with_clang presets
llvm-symbolizer is critical to ASAN/LSAN properly reading and applying
allowlists and suppressions. Without properly symbolized backtraces,
the tools cannot match stack traces to suppression lists, leading to
false negatives in leak detection and other issues.

Ensure that it's installed in the toolchain presets.
2025-06-03 20:06:37 -06:00
Bassam (Sam) Khouri
a530f90a71 Revert "preset: build with no assertion for swiftpm on linux (#81217)"
This reverts commit 39cf29b8ed.
2025-05-20 22:01:48 -04:00
Anthony Latsis
0777dbd4d8 Merge pull request #81284 from AnthonyLatsis/no-warnings-asserts
[presets] Escalate C++ "unused" warnings in macOS smoke test
2025-05-14 23:24:37 +01:00
Eric Miotto
a5261ae492 Merge pull request #81386 from edymtt/edymtt/do-not-crosscompile-llvm-under-linux
Reenable build of compiler-rt with LLVM_ENABLE_RUNTIMES in Linux bots...
2025-05-14 06:47:30 -07:00
Anthony Latsis
e7237fddc7 [presets] Escalate C++ "unused" warnings in 'smoketest=macosx' 2025-05-13 16:14:40 +01:00
Sam Khouri
2962ea2b31 preset: treat swift testing the same as xctest
Whenever XCtest is build and installed, do the same for swift-testing
and swift-testing macros.
2025-05-12 10:53:17 -04:00
Max Desiatov
eac419b8ca Merge pull request #81178 from swiftlang/maxd/install-wasmkit
This enables `swift run` and `swift test` to use WasmKit when cross-compiling to Wasm with Swift SDKs that have toolsets pointing to WasmKit.

rdar://150382758
2025-05-12 02:27:49 +01:00
Eric Miotto
c018f679e8 Revert "Fallback to legacy way to build compiler-rt in some Linux bots"
This reverts commit 0441a81211.
2025-05-09 09:20:04 -07: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
Max Desiatov
07d611ec5a Merge branch 'main' of https://github.com/swiftlang/swift into maxd/install-wasmkit 2025-05-08 13:03:41 +01:00
Rauhul Varma
12dbe021ea Add llvm embedded tools to toolchains
Updates the build presets for macOS and linux toolchains to include
llvm-objdump and llvm-objcopy needed for embedded platform development.
2025-05-07 19:48:06 -07:00
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
0441a81211 Fallback to legacy way to build compiler-rt in some Linux bots
In particular, this ensures we are able to build Linux packages for aarch64.

Addresses rdar://150423995
2025-05-07 06:53:35 -07:00
Bassam (Sam) Khouri
39cf29b8ed preset: build with no assertion for swiftpm on linux (#81217)
To work around https://github.com/swiftlang/swift/issues/81144, build
the Swift PM linux pseudo-toolchain without assertion

<!--
If this pull request is targeting a release branch, please fill out the
following form:

https://github.com/swiftlang/.github/blob/main/PULL_REQUEST_TEMPLATE/release.md?plain=1

Otherwise, replace this comment with a description of your changes and
rationale. Provide links to external references/discussions if
appropriate.
If this pull request resolves any GitHub issues, link them like so:

  Resolves <link to issue>, resolves <link to another issue>.

For more information about linking a pull request to an issue, see:

https://docs.github.com/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
-->

<!--
Before merging this pull request, you must run the Swift continuous
integration tests.
For information about triggering CI builds via @swift-ci, see:

https://github.com/apple/swift/blob/main/docs/ContinuousIntegration.md#swift-ci

Thank you for your contribution to Swift!
-->
2025-05-01 22:29:56 -07:00
Max Desiatov
d08490ff46 Include wasmkit in mixin_osx_package_base preset 2025-04-30 09:43:32 +01:00
Evan Wilde
f36391d4c8 Bootstrap: Install dispatch in stage0
The concurrency runtimes require that dispatch is installed or it will
fail to load at launch. The C library is built as part of the
concurrency build but is not installed. We need to install a copy of
dispatch so that programs that link concurrency run.
2025-04-27 19:50:34 -07:00
Evan Wilde
4130bca088 Bootstrap: Stage 2 preset
Adding a stage-2 preset. This preset adds SwiftPM and XCTest to the
built products. The stage-1 preset could likely build all of the
product, but because the stage-1 compiler was built without several
optimizations available in the stage-0 compiler, this compiler will not
be as performant as a separate stage-2 compiler.
2025-04-26 13:39:55 -07:00
Evan Wilde
d168fc9683 Bootstrap: Add stage-1 preset
Adding a stage-1 buildbot preset and updating the stage 0 preset to
install the stage0 bootstrap somewhere so that it can be used to
bootstrap the stage-1 toolchain.
2025-04-25 16:18:49 -07:00
Eric Miotto
60150e7da0 Run only Swift subset of LLDB tests for Linux Smoketest preset
Addresses rdar://149562580
2025-04-18 11:45:21 -07:00
Evan Wilde
9826e27390 Merge pull request #79856 from etcwilde/ewilde/bootstrap-stage0-config
Build Preset: Bootstrap Stage-0 Toolchain
2025-03-14 14:44:40 -07:00
Saleem Abdulrasool
51fcb45b95 utils: repair the XCTest build configuration
Swift Package Manager has grown a dependency on swift-testing and
swift-testing-macros. Ensure that we build these dependencies when
testing.
2025-03-12 18:34:14 -07:00
Evan Wilde
4ca2eb442d Build Preset: Bootstrap Stage-0 Toolchain
This preset builds the compiler and standard library on a system without
an existing Swift.

Note, there are many issues with it and it won't be able to pass tests.
It is an intermediate product that will need to build a compiler with
the Swift sources. The stage-0 compiler won't be able to build the
driver as the driver depends on Foundation, which requires macro support
and the stage-0 compiler does not have macro support. It will need to
build swiftsyntax though to give the stage-1 compiler macro support.
The stage-1 compiler then can build a stage-2 toolchain with most of the
libraries and runtimes. That stage-2 toolchain should then be capable of
building the full nightly toolchain package.
2025-03-12 12:31:45 -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
Ben Barham
f0c62826db Re-work the mixins for swiftpm and downstream packages
Keep mixin_swiftpm_base as the base of SwiftPM and all dependents, but
then separate the SwiftPM + package bases and their respective
platforms.

This allows SwiftPM to add its own changes without impacting downstream
packages (eg. the recently added cross compile setting).
2025-02-14 09:18:31 -08:00
Bassam (Sam) Khouri
73c875d571 Merge pull request #79074 from bkhouri/t/main/support-swifttesting-in-swiftpm-for-toolchain-build
swiftpm: Test only running host platform architecture
2025-02-10 08:16:02 -05:00
Sam Khouri
1f3e232de7 swiftpm: Test only running host platform architecture
When adding a Swift Testing test to Swift PM repository, the `test`
portion of t he OSX package pipeline was building against x86_64 and
arm64.

Ensure Swift PM testing only runs against the host platform
architecture.
2025-02-07 10:35:29 -05:00
Owen Voorhees
e0689cf8f1 Add libclang to install_components_with_clang presets 2025-02-02 21:29:57 -08:00
Evan Wilde
2f639fc2ed Enable new stdlib build in macOS smoke tests
This patch enables the new runtime build in macOS smoke testing in CI.
This is only ensuring that the default configuration builds and does not
enable anything fancy at this time.
2025-01-25 17:30:30 -08:00
Evan Wilde
e4887c7193 Disable the new stdlib build (#78878)
Somehow the new build system is affecting the old build system in such a
way that it's not producing the Swift Concurrency runtime for smoke
testing, resulting in test failures due to the missing library.

```
/Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/llvm-macosx-x86_64/bin/llvm-nm: error: /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/build/buildbot_incremental/swift-macosx-x86_64/lib/swift/macosx/x86_64/libswift_Concurrency.dylib: No such file or directory
```

This isn't even a directory that is affected by the new build, but
disabling to try to bring things back up.
2025-01-24 10:21:42 -08:00
Evan Wilde
74d4917851 Merge pull request #78477 from etcwilde/ewilde/macos-smoketest-enable-new-build
Enable new stdlib build in macOS smoke tests
2025-01-23 12:48:22 -08:00
Alex Hoppen
e2235e201c Merge pull request #78421 from ahoppen/add-sourcekit-plugin
[SourceKit] Add mechanism to load plugins for request handling into SourceKit
2025-01-15 12:42:10 -08:00
Yuta Saito
c68db65453 Merge pull request #78341 from kateinoigakukun/katei/add-sourcekit-lsp-verify
CI: Add `--sourcekit-lsp-verify-generated-files` build-script option
2025-01-16 01:09:43 +09:00
Ben Barham
b718c6d448 Merge pull request #78575 from bnbarham/fix-compat-suite
Build swift-testing as part of the compat-suite toolchain
2025-01-13 14:57:02 -08:00
Ben Barham
57331b2299 Build swift-testing as part of the compat-suite toolchain
Various projects (vapor in particular) now depend on swift-testing. The
current Xcode installation doesn't contain it and we're not building it,
so they're failing. Update the base compat suite preset to also build
swift-testing (and its macros).
2025-01-13 08:35:25 -08:00
Bassam Khouri
d4a09302d6 build script: Update SwiftPM preset
Update the mixin_swiftpm_base presets include Swift Testing and Swift
Testing macros.
2025-01-10 13:51:08 -05:00
Evan Wilde
e0e418f5d3 Enable new stdlib build in macOS smoke tests
Fixed an issue in the convenience wrapper that resulted in building all
copies of the standard library for the default compiler architecture
instead of the desired architecture. To fix this, we pull the desired
target triple and deployment target from the existing variables and pass
that into the CMake invocation.
2025-01-08 16:23:02 -08:00
Alex Hoppen
2447e74d47 [SourceKit] Install sourcekit-inproc into toolchain 2025-01-08 23:13:15 +01:00
Yuta Saito
57cc7c28b9 CI: Add --sourcekit-lsp-verify-generated-files build-script option
To verify that autogenerated files in the source tree match the ones that
would be generated from source.
2024-12-21 19:03:07 +00:00
Meghana Gupta
aaaf5a4916 Merge pull request #78260 from meg-gupta/enableedgecase
Allow SimplifyCFG::simplifyArgument on borrowed values
2024-12-17 20:59:31 -08:00
Meghana Gupta
4299974bf1 Skip building xros in macos_only preset 2024-12-17 15:03:11 -08:00
Marc Prud'hommeaux
0107a555cd Add preset buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build,x86_64 2024-12-06 13:27:13 -05:00
Marc Prud'hommeaux
01353517ca Update buildbot_linux_crosscompile_android preset 2024-12-06 09:41:54 -05:00
Max Desiatov
4ebcea39c0 Revert "Revert "CI: Include stdlib build for Wasm in the Linux buildbot" (#76…"
This reverts commit 8542e59546.
2024-11-29 12:21:24 +00:00
Ben Barham
e8efc3e9e2 [Build] Temporarily remove lldb smoketest from linux preset
This preset adds `libcxx`, which neither the full test or toolchain jobs
run.
2024-10-29 11:13:22 +10:00