Skip to content

new(llvm.org/mingw-w64): from-source LLVM-mingw cross-toolchain#13048

Merged
jhheider merged 4 commits into
pkgxdev:mainfrom
tannevaled:new/llvm.org/mingw-w64-composition
Jun 27, 2026
Merged

new(llvm.org/mingw-w64): from-source LLVM-mingw cross-toolchain#13048
jhheider merged 4 commits into
pkgxdev:mainfrom
tannevaled:new/llvm.org/mingw-w64-composition

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Summary

  • Adds llvm.org/mingw-w64 as a composition recipe: wraps pantry's llvm.org (clang + lld + LLVM tools) with mingw-w64.org (Windows runtime — headers + CRT + winpthreads) to produce a self-contained, from-source Windows cross-compiler toolchain.
  • Build script just generates per-target POSIX-sh driver wrappers that shim clang with --target=<target> --sysroot=<mingw-w64.org>, plus binutils-equivalent aliases (ar / ranlib / strip / nm / objdump / objcopy / windres / dlltool / ld) for autotools + Makefile compat. All real compilation happens in the two component recipes.
  • From-source over vendored — no warnings: vendored. Replaces the prior vendored approach (new(llvm.org/mingw-w64): LLVM-based mingw-w64 cross-compiler (Windows-target toolchain) #12984, which pulled mstorsjo/llvm-mingw prebuilt tarballs). Companion to new(mingw-w64.org): Windows runtime libs (headers + CRT + winpthreads) — from source #13047 (mingw-w64.org runtime).

Test plan

  • Cross-builds hello.c for both x86_64-w64-mingw32 and aarch64-w64-mingw32 targets
  • PE/COFF magic-byte check (MZ header)
  • Optional wine runtime test (soft-skips when wine isn't on PATH)
  • Provides list audit: 28 per-target binaries + 3 top-level PE-aware tools

Context

This supersedes #12984 — that branch pinned the vendored-tarball approach. Per the project goal of source-buildable independence ("être capable de compiler depuis les sources est un gage d'indépendance"), this PR drops the vendored path entirely and composes pantry's own builds.

Closes #12984 (will close once this is reviewed-OK).

🤖 Generated with Claude Code

tannevaled and others added 2 commits June 26, 2026 22:30
Composition recipe that wraps pantry's existing builds:

  - llvm.org → clang + clang++ + lld + LLVM binutils
  - mingw-w64.org → Windows runtime (headers + CRT + winpthreads),
    built from source — see companion pantry#13047

The build script just generates per-target POSIX-sh driver wrappers
shimming clang with `--target=<target> --sysroot=<mingw-w64.org>`,
plus binutils-equivalent aliases (ar/ranlib/strip/nm/objdump/objcopy/
windres/dlltool/ld) for autotools and Makefile compat.

End-to-end test: cross-build hello.c for x86_64 + aarch64 Windows
targets, PE/COFF magic-byte check, optional wine runtime test.

From-source over vendored (no `warnings: vendored`) per pantry policy
and the project goal of source-buildable independence.
@jhheider jhheider force-pushed the new/llvm.org/mingw-w64-composition branch from 8ad9054 to 047fbf1 Compare June 27, 2026 02:30
@jhheider jhheider force-pushed the new/llvm.org/mingw-w64-composition branch 3 times, most recently from 0aa5392 to 3c25ed1 Compare June 27, 2026 06:31
Refactor build script for aarch64 architecture and update CFLAGS.
@jhheider jhheider force-pushed the new/llvm.org/mingw-w64-composition branch from 3c25ed1 to 243f4cf Compare June 27, 2026 07:14
@jhheider jhheider merged commit 0a9f83e into pkgxdev:main Jun 27, 2026
8 checks passed
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.

2 participants