Skip to content

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

Open
tannevaled wants to merge 1 commit into
pkgxdev:mainfrom
tannevaled:new/llvm.org/mingw-w64-composition
Open

new(llvm.org/mingw-w64): from-source LLVM-mingw cross-toolchain#13048
tannevaled wants to merge 1 commit 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

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.
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