Commit Graph

8785 Commits

Author SHA1 Message Date
Ian Anderson
78552bb258 Merge pull request #83178 from ian-twilightcoder/expand-resp
[utils] expand @-filelist files with .resp filename extensions
2025-07-21 14:14:58 -07:00
Ben Barham
85f7797dd6 Merge pull request #82514 from bnbarham/use-compiler-version
Use SWIFT_COMPILER_VERSION before SWIFT_TOOLCHAIN_VERSION if it exists
2025-07-21 13:38:50 -07:00
Max Desiatov
44a68115bf Merge pull request #83135 from MaxDesiatov/test-wasm-stdlib
build-script: allow `--test-wasm-stdlib` without `--build-wasm-stdlib`

This allows testing Wasm stdlib without fully rebuilding WASI sysroot and stdlib, while changes to stdlib itself are still detected by ninja as dependencies and are built incrementally, which is great for local builds.
2025-07-21 17:22:25 +01:00
Max Desiatov
cf0e96c84b build_script_invocation.py: add a note about wasi-sdk-26 adoption 2025-07-21 12:14:48 +01:00
Yuta Saito
e76997aad2 Merge pull request #83191 from kateinoigakukun/yt/xctest-build-wasi 2025-07-21 18:42:04 +09:00
Yuta Saito
960afc5754 Merge pull request #83167 from kateinoigakukun/yt/wasip1
[wasm] Rename `wasm32-unknown-wasi` to `wasm32-unknown-wasip1`
2025-07-21 10:35:33 +09:00
Yuta Saito
686d65513d [wasm] Build and install XCTest for Wasm Swift SDK
Install static XCTest library and its Swift module files in the following
directory structure:

```
usr/lib/swift_static/wasi/libXCTest.a
usr/lib/swift_static/wasi/XCTest.swiftmodule
```
2025-07-20 00:14:34 +00:00
Ian Anderson
fc96b8518b [utils] expand @-filelist files with .resp filename extensions
Xcode puts clang command line arguments in a single line in .resp files.
Split the argument printing routine into its own function print_arg.
When a clang response file is encountered, split each line into arguments and loop them through print_arg.
-c has an argument for clang
2025-07-18 22:35:53 -07:00
Saleem Abdulrasool
21533c68f0 utils: add Distributed to the experimental Windows SDK
We now have distributed in the SDK set as well. This brings us closer to
having a complete static SDK on Windows.
2025-07-18 14:55:47 -07:00
Saleem Abdulrasool
b4b9311696 Merge pull request #83158 from compnerd/observation
utils: build the static Obversation module on Windows
2025-07-18 14:53:32 -07:00
Evan Wilde
b97df2645b Merge pull request #83159 from etcwilde/ewilde/freebsd-package-preset
Build-Script: FreeBSD Package Preset
2025-07-18 12:52:51 -07:00
Ben Barham
f3fa225df2 Merge pull request #83163 from swiftlang/shahmishal-patch-2
Update the rebranch scheme to use stable/21.x
2025-07-18 09:30:48 -07:00
Max Desiatov
0cd57218aa Merge pull request #83134 from MaxDesiatov/consistent-wasmkit-path
wasm-run.py: consistent `wasmkit` path with `build_runtime_with_host_compiler`

When passing `--build-runtime-with-host-compiler` there's no such executable `wasmkit-cli` in the host toolchain, where it's named `wasmkit` when installed. Let's make that consistent to make it work in both cases.
2025-07-18 15:52:18 +01:00
Max Desiatov
b9721408f7 wasmkit.py: copy to wasmkit not wasmkit-cli path 2025-07-18 09:54:46 +01:00
Erik Eckstein
589ff40994 utils: let split-cmdline expand @-filelist files which end with "FileList"
So far only ".txt" were handled
2025-07-18 09:45:28 +02:00
Erik Eckstein
4a32f0959d utils: fix split-cmdline
If an argument does not start with an "-", it's not necessarily an argument parameter. It can also be e.g. an input file name.
2025-07-18 09:45:28 +02:00
Yuta Saito
3a0d5fd0a1 [wasm] Rename wasm32-unknown-wasi to wasm32-unknown-wasip1 2025-07-18 02:03:16 +00:00
Mishal Shah
739f06c977 Update the rebranch scheme to use stable/21.x 2025-07-17 17:49:57 -07:00
Max Desiatov
b6c791784d [NFC] wasmstdlib.py: fix Python typing error (#83125)
Fix type error in `should_test_executable`:
```
reportIncompatibleMethodOverride: Method "should_test_executable" overrides class "WasmStdlib" in an incompatible manner
Return type mismatch: base method returns type "Literal[True]", override returns type "Literal[False]"
"Literal[False]" is not assignable to type "Literal[True]"
```
2025-07-17 16:14:30 -07:00
Evan Wilde
dbb3498236 Build-Script: FreeBSD Package Preset
Adding a preset for building the FreeBSD toolchain and runtime package.
This is very similar to the Linux package build, but the main difference
is the lack of WASM build. The WASM runtime build system uses GNU
extensions in its makefiles that are not compatible with the make or
gmake on FreeBSD and therefore cannot be built there.
2025-07-17 15:18:56 -07:00
Saleem Abdulrasool
a220f2ed3d utils: build the static Obversation module on Windows
Extend the experimental SDK with the Observation module as we work
towards a complete SDK distribution.
2025-07-17 15:16:04 -07:00
Saleem Abdulrasool
2e8f74f011 Merge pull request #83131 from compnerd/synchronized-overlay
Runtimes: wire up the overlay to the Synchornization library
2025-07-17 15:06:39 -07:00
Max Desiatov
f895331630 wasisysroot.py: fix build_runtime_with_host_compiler diagnostics (#83129)
Improve diagnostics when `llvm-ar` is not detected in the currently select toolchain.
2025-07-17 21:59:52 +01:00
Max Desiatov
c798cf0bb5 Updated expected_options and defaults in driver_arguments 2025-07-17 21:36:53 +01:00
Charles Zablit
a8c36dcd46 Merge pull request #83061 from swiftlang/charles-zablit/windows/fix-wrong-LLVM_HOST_TRIPLE
[windows][lldb] fix incorrect LLVM_HOST_TRIPLE when cross-compiling
2025-07-17 19:51:15 +02: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
326c73f5ec wasm-run.py: make wasmkit path consistent with build_runtime_with_host_compiler
When passing `--build-runtime-with-host-compiler` there's no such executable `wasmkit-cli` in the host toolchain, where it's named `wasmkit` when installed. Let's make that consistent to make it work in both cases.
2025-07-17 17:16:07 +01:00
Saleem Abdulrasool
f19e5b4476 Runtimes: wire up the overlay to the Synchornization library
This allows us to pass along the overlay VFS mappings to workaround the
PCM compilation not receiving the builtin mapping from the compiler.
2025-07-17 08:57:53 -07:00
Mishal Shah
48e154160a Merge pull request #82999 from etcwilde/ewilde/bump-certificates-version
Swift-Certificates: 1.10.0 -> 1.10.1
2025-07-15 10:02:45 -07:00
Charles Zablit
6d42649ff9 [windows][lldb] fix incorrect LLVM_HOST_TRIPLE when cross-compiling 2025-07-15 17:21:23 +02:00
Max Desiatov
00a1349304 Merge pull request #83030 from MaxDesiatov/maxd/wasm-stdlib-preset
build-presets.ini: add `wasm_stdlib,macos` for at-desk development

There are no non-incremental presets currently available for macOS in `build-presets.ini`, and existing non-incremental presets only cross-compile to Wasm on Linux. Let's add one for macOS to make development on that platform easier.
2025-07-14 22:25:18 +01:00
Max Desiatov
b3938195ce utils/wasm-run.py: clean up naming for WASIRunner (#83028) 2025-07-14 13:33:58 -07:00
Max Desiatov
54bd83e3b1 build-presets.ini: add build-wasm-stdlib to wasm_stdlib,macos 2025-07-14 15:30:44 +01:00
Max Desiatov
a071f0cf01 build-presets.ini: add swift-testing for wasm_stdlib,macos 2025-07-14 15:17:39 +01:00
Max Desiatov
383ddac591 build-presets.ini: add wasm_stdlib,macos for at-desk development
There are no non-incremental presets currently available for macOS in `build-presets.ini`, and existing non-incremental presets only cross-compile to Wasm on Linux. Let's add one for macOS to make development on that platform easier.
2025-07-14 15:16:07 +01:00
Saleem Abdulrasool
13256be5e5 Merge pull request #83007 from compnerd/correction
utils: correct flag handling for static runtime libdispatch handling
2025-07-13 13:52:17 -07:00
Ben Barham
ec46a4f026 Use SWIFT_COMPILER_VERSION before SWIFT_TOOLCHAIN_VERSION if it exists
We should eventually split these, but for now SWIFT_COMPILER_VERSION
matches SWIFT_TOOLCHAIN_VERSION when it's actually set. Just use it in
preference to SWIFT_TOOLCHAIN_VERSION.
2025-07-11 15:21:43 -07:00
Max Desiatov
113ddb45d5 wasisysroot.py: respect args.build_runtime_with_host_compiler (#82946)
This allows quickly building WASI sysroot when `--skip-build-llvm --skip-build-swift --build-runtime-with-host-compiler --build-wasm-stdlib` combination of options is passed to `build-script`.
2025-07-11 11:51:46 -07:00
Saleem Abdulrasool
a3e7e8b500 utils: correct flag handling for static runtime libdispatch handling
We were not passing along the proper flags to the runtime build
resulting in the library expecting libdispatch to be linked dynamically.
2025-07-11 11:29:30 -07:00
Evan Wilde
9cb676d6bc Swift-Certificates: 1.10.0 -> 1.10.1
Bumping the Swift-Certificates version to include  changes for FreeBSD.
2025-07-11 10:13:32 -07:00
finagolfin
d2ea4789d8 Merge pull request #82924 from finagolfin/cmake
[build] Fix libcurl and cross-compiling corelibs
2025-07-11 16:15:03 +05:30
Max Desiatov
2103b4b24d Add llvm-nm to llvm-install-components in build-presets.ini (#82945)
This LLVM tool is required for cross-compiling and debugging binaries cross-compiled to non-Darwin platforms, but for some reason is currently not included unlike `llvm-ar` or `llvm-ranlib`.
2025-07-11 09:12:55 +01:00
Ian Anderson
0eb0e426bb Merge pull request #82975 from ian-twilightcoder/split-cmdline
[utils] Add more flags to split-cmdline
2025-07-10 21:44:37 -07:00
Max Desiatov
f1a1bb09f7 WasmLLVMRuntimeLibs: respect args.build_runtime_with_host_compiler (#82949)
This allows quickly building `WasmLLVMRuntimeLibs` product with the host toolchain (usually Swift nightly development snapshot toolchain) when `--skip-build-llvm --skip-build-swift --build-runtime-with-host-compiler` combination of options is passed to `build-script`.
2025-07-10 17:58:22 -07:00
Ian Anderson
2251dc77c0 [utils] Add more flags to split-cmdline
Add several clang flags that don't show up in its --help (many are cc1 flags).
Add a heuristic that if an argument doesn't start with a '-' then it's an argument parameter.
Special case -finclude-tree-preserve-pch-path as not an argument that has a parameter.
2025-07-10 16:43:47 -07:00
Saleem Abdulrasool
817922175d Merge pull request #82932 from compnerd/static-flags
utils: build static runtime with static dispatch and closure
2025-07-10 14:46:09 -07:00
Max Desiatov
b0f1283c40 wasmstdlib.py: respect args.build_runtime_with_host_compiler (#82944)
This allows quickly building WASI-libc and Swift stdlib with WASI when `--skip-build-llvm --skip-build-swift --build-runtime-with-host-compiler` combination of options is passed to `build-script`.
2025-07-10 14:22:18 -07:00
Evan Wilde
ef9e7144db Merge pull request #82583 from etcwilde/ewilde/update-dep-versions
Update collections, crypto, certs, and asn1 tag
2025-07-10 11:10:35 -07:00
Finagolfin
fd369624de [build] Fix libcurl for typos and correct name of build target 2025-07-10 12:41:09 +05:30
Finagolfin
1a0a44b670 [build] Set CMAKE_Swift_COMPILER_TARGET when cross-compiling corelibs 2025-07-10 12:40:24 +05:30