Skip to content

WIP: Migrate Fusilli from header-only to compiled static library#192

Draft
sjain-stanford wants to merge 2 commits intomainfrom
sambhav/rewrite
Draft

WIP: Migrate Fusilli from header-only to compiled static library#192
sjain-stanford wants to merge 2 commits intomainfrom
sambhav/rewrite

Conversation

@sjain-stanford
Copy link
Copy Markdown
Member

Summary

  • Move all headers from include/ to src/ and extract inline implementations from 8 headers into .cc files, converting Fusilli from a header-only INTERFACE library to a compiled STATIC library
  • Reduces per-TU compile cost, ensures singletons have a single definition site, and produces a .a artifact for downstream consumers
  • No changes needed to downstream consumers (fusilli::fusilli target name unchanged, #include "fusilli/..." paths unchanged)

Changes

CMakeLists.txt: INTERFACESTATIC, source glob from src/*.cc, visibility keywords INTERFACEPUBLIC/PRIVATE, sanitizer/coverage flags for library target, ARCHIVE install destination

New .cc files (8): asm_emitter, runtime, backend, compile_session, compile_command, graph, cache, external_tools

Trimmed headers (8): Implementation bodies removed, declarations retained, templates stay inline

.clang-tidy: Disable llvm-header-guard (computes machine-specific absolute-path guards incompatible with project's FUSILLI_* style)

🤖 Generated with Claude Code

sjain-stanford and others added 2 commits February 25, 2026 07:47
Move all headers from include/ to src/ and extract inline
implementations from 8 headers into corresponding .cc files to
produce a STATIC library target instead of INTERFACE.

- CMakeLists.txt: INTERFACE → STATIC, source glob from src/*.cc,
  visibility keywords INTERFACE → PUBLIC/PRIVATE, add sanitizer
  and coverage flags for the library target, add ARCHIVE install
- New .cc files: asm_emitter, runtime, backend, compile_session,
  compile_command, graph, cache, external_tools
- Headers trimmed to declarations only (templates stay inline)
- Include paths unchanged (#include "fusilli/..." still works)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add direct includes to all .cc files for IWYU compliance per
misc-include-cleaner: project headers (logging, cache, handle,
node types, attribute types), IREE headers (modules/hal/types.h,
modules/hal/debugging.h, base/config.h), and standard library
headers (utility, memory, string, etc).

Disable llvm-header-guard in .clang-tidy config — the check
computes machine-specific absolute-path guards which conflict
with the project's intentional short guard style (FUSILLI_*).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sjain-stanford sjain-stanford changed the title Migrate Fusilli from header-only to compiled static library WIP: Migrate Fusilli from header-only to compiled static library Feb 25, 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.

1 participant