feat(packaging): bundle LLVM 23.1.2
LLVM 23 has been the stable series since September, and the distros crafter-build cross-builds for have moved to it: Alpine edge ships libc++ 23.1.2, which is what surfaced the std module mismatch fixed in the previous commits. wasi-sdk 34 already builds against a newer LLVM than 22 upstream, so the WASI sysroot loses nothing by following. The bump exposed a patch step that never ran. wasi-sdk patches its LLVM tree with `git apply` in src/llvm-project, which upstream is a submodule. Here that directory is a tarball unpacked inside the wasi-sdk checkout, and git, finding the outer repository, treats every patched path as outside the current directory, prints "Skipped patch" and exits 0. LLVM 22 built without the three patches; libc++ 23 does not compile for WASI without the one that keeps the z/OS locale shim out of other platforms' builds (strtod_l redeclared with an abi_tag). `git init` on the unpacked tree makes it a repository of its own, so wasi-sdk's step applies whatever patch list the pinned tag carries, as it does upstream, and fails loudly when a patch no longer fits. Built locally: the whole manifest, the suite inside the sandbox (26 passed, WasmHelloRuns under the bundled wasmtime included), and aarch64 musl cross builds against Alpine edge and v3.24 sysroots that run under qemu. The native development loop is unaffected and stays on whatever clang the machine has. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
cbf2b94f06
commit
8dccb88b78
1 changed files with 16 additions and 4 deletions
|
|
@ -106,8 +106,8 @@ modules:
|
|||
- /bin/scan-view
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz
|
||||
sha256: 922f1817a0df7b1489272d18134ee0087a8b068828f87ac63b9861b1a9965888
|
||||
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-23.1.2/llvm-project-23.1.2.src.tar.xz
|
||||
sha256: c98bbef08a2b4c2613cd50e9aa9ae7b69b1fe6c16b2c40373bc0ab6116fdf78a
|
||||
|
||||
- name: wasi-sysroot
|
||||
# wasi-sdk's sysroot-only mode, driven by the clang built above:
|
||||
|
|
@ -155,9 +155,21 @@ modules:
|
|||
commit: 2e6fb9d8ee0cdf9e431fbcabe8af3115de000a13
|
||||
dest: src/wasi-libc
|
||||
- type: archive
|
||||
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/llvm-project-22.1.8.src.tar.xz
|
||||
sha256: 922f1817a0df7b1489272d18134ee0087a8b068828f87ac63b9861b1a9965888
|
||||
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-23.1.2/llvm-project-23.1.2.src.tar.xz
|
||||
sha256: c98bbef08a2b4c2613cd50e9aa9ae7b69b1fe6c16b2c40373bc0ab6116fdf78a
|
||||
dest: src/llvm-project
|
||||
# wasi-sdk patches its LLVM tree before building libc++ (`git apply` in
|
||||
# src/llvm-project), and upstream that directory is a submodule, a
|
||||
# repository of its own. Unpacked from a tarball it is a plain
|
||||
# subdirectory of the wasi-sdk checkout, where git treats the patched
|
||||
# paths as outside the current directory, skips every one of them and
|
||||
# exits 0. LLVM 22 happened to build without the patches; LLVM 23's
|
||||
# libc++ does not compile for WASI without one of them. Making the tree
|
||||
# a repository lets wasi-sdk's own patch step do what it does upstream,
|
||||
# with whatever patch list the pinned tag carries.
|
||||
- type: shell
|
||||
commands:
|
||||
- git init -q src/llvm-project
|
||||
- type: file
|
||||
path: wasi-host-toolchain.cmake
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue