Skip to content

Auto-generate wrapper.h from installed MLIR headers, add no-version-check feature#85

Merged
raviqqe merged 3 commits intomainfrom
auto-generate-wrapper
Mar 20, 2026
Merged

Auto-generate wrapper.h from installed MLIR headers, add no-version-check feature#85
raviqqe merged 3 commits intomainfrom
auto-generate-wrapper

Conversation

@edg-l
Copy link
Copy Markdown
Member

@edg-l edg-l commented Mar 19, 2026

Drop the static wrapper.h and generate it at build time in build.rs. generate_wrapper walks {includedir}/mlir-c/ recursively, skips Bindings/, sorts the results, and writes a #include list to $OUT_DIR/wrapper.h. New or removed dialect headers are picked up automatically, including out-of-tree ones.

Add a no-version-check cargo feature that skips the llvm-config --version check. Enables building against MLIR main/trunk without patching the crate. Fixes #43 .

Bump version to 220.0.1. Update README to document both the auto-discovery behavior and the no-version-check feature.

(Depends first on pr #84 )

edg-l added 2 commits March 19, 2026 10:04
- Bump version to 220.0.0
- Update LLVM_MAJOR_VERSION to 22
- Add 22 new dialect headers (Affine, AMX, ArmNeon, ArmSME, ArmSVE,
  Bufferization, Complex, DLTI, Index, MPI, OpenACC, PDLInterp, Ptr,
  Shard, SMT, Tosa, UB, VCIX, WasmSSA, X86Vector, XeGPU, XeVM)
- Add new target header (ExportSMTLIB)
- Update CI and docs for LLVM 22
Instead of maintaining a static wrapper.h, scan the MLIR C API
headers from the LLVM installation at build time. This automatically
picks up new, removed, or custom/out-of-tree dialect headers.

Also adds a `no-version-check` feature to allow building against
MLIR main/trunk without version validation (closes #43).
@edg-l edg-l marked this pull request as ready for review March 19, 2026 09:18
@edg-l edg-l requested a review from raviqqe March 19, 2026 09:18
@edg-l edg-l linked an issue Mar 19, 2026 that may be closed by this pull request
Base automatically changed from llvm-22 to main March 19, 2026 15:54
Copy link
Copy Markdown
Member

@raviqqe raviqqe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes!

@raviqqe raviqqe merged commit 773f5cc into main Mar 20, 2026
7 checks passed
@raviqqe raviqqe deleted the auto-generate-wrapper branch March 20, 2026 04:37
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.

Ability to use MLIR main

2 participants