Skip to content

tools/aurora-bindgen: fix the layout checks without rustfmt - #2157

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
scottjones:upstream/bindgen-no-rustfmt
Nov 17, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
scottjones:upstream/bindgen-no-rustfmt

Conversation

@scottjones

Copy link
Copy Markdown
Contributor

Summary

bindgen emits valid unformatted Rust when rustfmt is not available. The layout test now accepts whitespace around the const assertion and rejects both formatted and unformatted test attributes. The compile and layout assertions are unchanged.

Evidence

  • Built on integration/aurora a7dd26e6d60e with the 7.3 package config, LLVM 18 and Rust 1.85:
    • run-host-tests.py: every tools/asahi test is registered
    • tools/aurora-bindgen/test.py with the private bindgen 0.73.2 (through the package's bindgen-kernel.py), Rust 1.85, LLVM 18: with rustfmt, passes on the base and on this branch. Without rustfmt: the base fails with "generator did not emit unconditional const layout checks"; this branch passes that check, then stops at the bitfields fixture on the unnecessary_transmutes lint, which the package's lint-stripping wrapper only removes from formatted output (an omarchy packaging limitation, not this change).
    • Stacked with the other 12 PRs on the same base, the full kernel, modules and DTBs build and package (linux-aurora 7.3.0-0testastip2-1-ARCH, 137 DTBs).
  • Booted as part of the full set: a kernel built from integration/aurora a7dd26e6 plus all 13 branches of this set (before the three small fix-up commits) booted on an M3 MacBook Air (J613), a Neo (J700) and an M1 Pro with no regressions against their baselines (on the M1 Pro, only the checks already known to differ: GPU name and DRAM OPP), and a 25-minute GPU soak was clean on all three. No M3 Pro, M3 Max, J504, J615 or M4 Pro ran this kernel.

Merge Danger

Door: two-way

Blast Radius: tooling

One line in tools/aurora-bindgen/test.py.

🤖 Generated with Claude Code

bindgen emits valid unformatted Rust when rustfmt is unavailable. Accept whitespace around the unconditional const assertion and reject both formatted and unformatted test attributes. Keep the C/Rust compilation and layout assertions unchanged.

Assisted-by: LLM
Signed-off-by: Kallisti <[email protected]>
Signed-off-by: Scott Jones <[email protected]>
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.

3 participants