Skip to content

Conversation

@jserv
Copy link
Contributor

@jserv jserv commented Jan 18, 2026

  • Add LLVM version detection macros to mk/toolchain.mk using 'define' for reusability: llvm-config-path, llvm-homebrew-config, detect-llvm-config, llvm-version, llvm-check-libs, llvm-cflags, llvm-libfiles
  • Support LLVM 18, 19, 20, and 21 (previously only LLVM 18)
  • Add compile-time version check in t2c.c with clear error/warning
  • Document MCJIT deprecation status: LLVM 22+ may deprecate MCJIT in favor of ORC JIT; when upgrading, review MCJIT status and LLVMGetInlineAsm signature changes
  • Allow user override via LLVM_CONFIG= make variable

Summary by cubic

Expand T2C LLVM support to versions 18–21 and add reusable detection + compile-time checks to make builds simpler and more reliable. Homebrew installs are handled, and users can override the LLVM binary via LLVM_CONFIG.

  • New Features

    • Added LLVM detection helpers in mk/toolchain.mk (detect-llvm-config, llvm-version, llvm-check-libs, llvm-cflags, llvm-libfiles, detect-homebrew-llvm-prefix).
    • Makefile now uses these helpers, sets flags from llvm-config, and adds Homebrew lib path when needed. Clear warnings if libs or llvm-config are missing.
    • t2c.c enforces LLVM 18–21 at compile time (error if <18, warning if >21). Notes MCJIT deprecation risk for LLVM 22+.
  • Refactors

    • Moved LLVM detection logic out of the Makefile into mk/toolchain.mk for reuse and readability.
    • Skip the JIT arch check when cross-compiling with emcc. Simplified T2C_OPT_LEVEL default handling.

Written for commit b26939d. Summary will update on new commits.

- Add LLVM version detection macros to mk/toolchain.mk using 'define'
  for reusability: llvm-config-path, llvm-homebrew-config,
  detect-llvm-config, llvm-version, llvm-check-libs, llvm-cflags,
  llvm-libfiles
- Support LLVM 18, 19, 20, and 21 (previously only LLVM 18)
- Add compile-time version check in t2c.c with clear error/warning
- Document MCJIT deprecation status: LLVM 22+ may deprecate MCJIT
  in favor of ORC JIT; when upgrading, review MCJIT status and
  LLVMGetInlineAsm signature changes
- Allow user override via LLVM_CONFIG= make variable
@jserv jserv added this to the release-2026.1 milestone Jan 18, 2026
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

Copy link
Contributor Author

@jserv jserv left a comment

Choose a reason for hiding this comment

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

Benchmarks

Details
Benchmark suite Current: b26939d Previous: 82205cb Ratio
Dhrystone 1597.333 DMIPS 1608.333 DMIPS 1.01
CoreMark 973.382 iterations/sec 958.926 iterations/sec 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@jserv jserv merged commit 8c0721b into master Jan 18, 2026
33 checks passed
@jserv jserv deleted the llvm-revisions branch January 18, 2026 03:57
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.

2 participants