Skip to content

feat(pkgs): llvm-musl-libcxx — musl-targeted libc++ static runtime payload - #677

Closed
yspbwx2010 wants to merge 2 commits into
openxlings:mainfrom
cloud-teahouse:feat/llvm-musl-libcpp
Closed

feat(pkgs): llvm-musl-libcxx — musl-targeted libc++ static runtime payload#677
yspbwx2010 wants to merge 2 commits into
openxlings:mainfrom
cloud-teahouse:feat/llvm-musl-libcpp

Conversation

@yspbwx2010

Copy link
Copy Markdown

Summary

  • New data-only package llvm-musl-libcxx: the musl-targeted libc++/libc++abi/libunwind static archives, headers and std.cppm/std.compat.cppm module sources, one asset per target arch (x86_64 + aarch64, each sha256-pinned).
  • Why: a clang frontend carries no target libc, so the LLVM family cannot serve *-linux-musl without a libc++ configured for the musl target (a host libc++'s __config_site describes a different ABI) and std module sources built over it. crt/libgcc/libc are NOT duplicated here — the engine side points clang at the existing musl-gcc payload via --gcc-toolchain.
  • Built from llvm-project release/22.x runtimes, the clang 22.1.8 payload cross-driving into each target's musl sysroot. Static-only: the musl target is a fully static ELF world.
  • Umbrella xvm node like libcxx-headers (a second copy of the standard library must not reach the host sysroot).
  • Assets staged on the contributor fork's release until migrated to xlings-res (sha256 pins the bytes); no ci block for the same reason libcxx-headers has none — the payload is rebuilt per llvm release, not re-downloaded.

Engine-side consumer: mcpp-community/mcpp#492 (adds the llvmSysroot target-table column that resolves this payload); tracking issue mcpp-community/mcpp#491. Design doc: .agents/docs/2026-08-23-llvm-musl-libcxx-package-design.md.

Test plan

  • pytest tests/ -m 'static or isolation': 1887 passed, 9 skipped (12 new tests in tests/l/test_llvm_musl_libcxx.py, including the both-arches-sha256 and static-only assertions)
  • Isolated-XLINGS_HOME full lifecycle: config --add-xpkginstall (download + sha256 + install-hook asserts on algorithm header / libc++.a / std.cppm) → remove, all green
  • End-to-end via the engine branch (mcpp#492) equivalent: fully static x86_64 binary (native run) and aarch64 binary (qemu) produced from this payload

…yload

A clang frontend carries no target libc, so the LLVM family cannot serve
*-linux-musl without three things it does not ship: a libc++ configured
for the musl target, std/std.compat module sources built over that
libc++, and crt/libgcc/libc. The third already lives in musl-gcc (the
engine points clang at it via --gcc-toolchain); this package is the
first two, per target arch (x86_64 + aarch64, each sha256-pinned).

- built from llvm-project release/22.x runtimes, clang 22.1.8 payload
  cross-driving into each target's musl sysroot; static archives only
  (the musl target is a fully static ELF world)
- umbrella xvm node like libcxx-headers: a second copy of the standard
  library must not reach the host sysroot
- assets staged on the contributor fork's release until migrated to
  xlings-res (sha256 pins the bytes); no ci block for the same reason
  libcxx-headers has none — the payload is rebuilt, not re-downloaded

Consumed by mcpp#492 (the engine's llvm-musl branch); design doc in
.agents/docs/2026-08-23-llvm-musl-libcxx-package-design.md.
The archives now live at cloud-teahouse/llvm-musl-libcxx (source +
per-release tarballs, sha256 sidecars in the release notes) instead of
the staging spot on the mcpp fork; same bytes, same sha256. Full
install/remove lifecycle re-verified against the new URL.
@yspbwx2010

Copy link
Copy Markdown
Author

Assets now live in a dedicated payload repo — cloud-teahouse/llvm-musl-libcxx (source + per-release archives with sha256 in the notes) — replacing the earlier staging spot; same bytes, same sha256. Descriptor updated and the full install/remove lifecycle re-verified against the new URL (12/12 package tests green).

@yspbwx2010

Copy link
Copy Markdown
Author

Superseded: mcpp now ships native --target <arch>-linux-musl support via openkal-llvm-runtime (verified end-to-end on mcpp v2026.8.26.2, see mcpp-community/mcpp#492). The prebuilt llvm-musl-libcxx payload this descriptor packaged is no longer needed — closing. Thanks for the review bandwidth.

@yspbwx2010 yspbwx2010 closed this Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant