Skip to content

feat: expand native 64-bit architecture support - #474

Merged
LunaStev merged 2 commits into
wavefnd:masterfrom
LunaStev:feat/next-release-architectures
Sep 5, 2026
Merged

LunaStev merged 2 commits into
wavefnd:masterfrom
LunaStev:feat/next-release-architectures

Conversation

@LunaStev

@LunaStev LunaStev commented Sep 5, 2026 •

Copy link
Copy Markdown
Member

Summary

  • promote Linux AArch64, Linux RISC-V64, macOS x86-64, and Windows ARM64 from target-only coverage to architecture-specific CI and release paths
  • add native Windows ARM64 compiler/case jobs, GNU ARM64 linking with a pinned llvm-mingw toolchain, and a self-contained Windows ARM64 release archive
  • implement Linux LoongArch64 as a complete LP64D target with LP64S and LP64F object ABI support
  • add LoongArch64 target registration, CPU/features/register rules, C ABI aggregate lowering, inline assembly, ELF/link validation, Wave-owned CRTs, sysroot discovery, standard-library providers, and QEMU execution
  • add independent LoongArch C interoperability fixtures and artifact-contract validation
  • publish Linux x86-64, AArch64, RISC-V64, and LoongArch64; macOS AArch64 and x86-64; and Windows x86-64 and ARM64 release assets

LoongArch64 contract

  • target: loongarch64-unknown-linux-gnu
  • default ABI: LP64D
  • additional object ABIs: LP64S and LP64F
  • hosted LP64S/LP64D linking selects ABI-specific CRT and loader contracts
  • hosted LP64F linking is rejected before the linker because glibc does not provide an LP64F runtime configuration
  • linker inputs, including archive members, are rejected before linking when their LoongArch base ABI flags do not match
  • the enabled case lane compiles the shared/LoongArch suites and executes architecture cases under QEMU with the pinned official Loongson sysroot

The target and test contracts remain explicit and backend-neutral where practical so they can be reused during the LLVM-to-Whale transition.

Validation

  • cargo fmt --all --check
  • cargo check --locked --all-targets --jobs 2
  • cargo test --locked --all-targets --jobs 2 — 6 unit and 58 codegen regression tests passed
  • explicit LoongArch64 Clang/LLD/QEMU C ABI interoperability — 4 focused regressions passed
  • cargo clippy --locked --all-targets --jobs 2 -- -D warnings
  • RUSTDOCFLAGS='-D warnings' cargo doc --locked --no-deps --jobs 2
  • 16 Python manifest/artifact contract tests
  • python3 tools/case_manifest.py validate — 40 targets
  • python3 tools/check_wave_corpus.py --wavec target/release/wavec — 248 passed, 0 failed
  • standard-library policy, workflow YAML, Python syntax, shell syntax, and git diff --check
  • pinned LLVM, llvm-mingw, and Loongson release asset names and SHA-256 digests checked against their GitHub release metadata

The native LoongArch64 release package builds LLVM 21 for LoongArch64 in CI; the component cross-toolchain and QEMU runtime path were validated locally, while the full package build remains a deliberate CI gate because of its size.

Closes #464
Closes #467

Related: #93, #292, #454

Follow-up audit

The post-PR alpha-readiness audit confirmed the existing frontend blockers #405
and #406 and opened focused follow-ups #475, #476, #477, #478, #479, and #480.
LoongArch64 LP64S executable interoperability coverage is tracked separately in
#481. These follow-ups are linked for visibility and are not implemented by this
pull request.

@LunaStev

LunaStev commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

Post-push CI audit found two independent follow-ups. I am leaving them outside this PR so their fixes can be reviewed with focused regressions:

The earlier feature-isolation failures were fixed in b369e3b: LoongArch remains a separate backend feature, while llvm-target-core64 stays usable with LLVM builds that only ship X86/AArch64/RISCV.

@LunaStev

LunaStev commented Sep 5, 2026

Copy link
Copy Markdown
Member Author

One more completed-job result was classified after the previous audit comment:

  • Make codegen regressions respect enabled LLVM target features #484 — the Windows GNU amd64 build itself succeeds, but seven regressions request LoongArch while the job intentionally enables only llvm-target-core64. The same platform's cases job passes. This is a feature-aware test-selection problem, not a failure of the amd64 backend.

Per the current scope, this is recorded for a focused follow-up instead of adding another patch to #474.

@LunaStev
LunaStev merged commit c10d229 into wavefnd:master Sep 5, 2026
20 of 24 checks passed
@LunaStev LunaStev mentioned this pull request Sep 30, 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.

Add a LoongArch64 Linux target contract for Wave and Whale Add LoongArch64 ELF validation to wave-test artifact contracts

1 participant