Skip to content

v1.5.4 — ctc-iwyu / ctc-clang-format / ctc-clang-tidy native shims

Choose a tag to compare

@zackees zackees released this 19 May 09:44
· 17 commits to main since this release
b274bef

Adds three new native shims to the unified clang_tool launcher. Demonstrates the design point from #31's investigation: extending the multi-role launcher to cover more tools doesn't add compile targets — just dispatch table entries.

New shims

Name Dispatches to Install root
ctc-iwyu include-what-you-use{ext} ~/.clang-tool-chain/iwyu/{plat}/{arch}/bin/
ctc-clang-format clang-format{ext} ~/.clang-tool-chain/clang_extra/{plat}/{arch}/bin/
ctc-clang-tidy clang-tidy{ext} ~/.clang-tool-chain/clang_extra/{plat}/{arch}/bin/

All three are hardlinks (Windows) or symlinks (Linux/macOS) to the same ctc-clang.exe already produced by compile-native. 23 names share one inode (was 20 in 1.5.3). Zero additional compile time.

Implementation

  • ToolEntry gained an optional binary field for cases where the user-facing alias differs from the on-disk binary name (ctc-iwyuinclude-what-you-use). The other 17 entries pass nullptr to keep their existing 1:1 mapping.
  • InstallKind enum gained Iwyu and ClangExtra. Subdir resolution moves into install_kind_subdir(kind); error hints route through install_hint(kind) so each missing-binary error suggests the right clang-tool-chain install ... command.

Install

pip install --upgrade clang-tool-chain
clang-tool-chain install clang clang-extra iwyu   # if not already installed
clang-tool-chain compile-native ./bin
ls ./bin/ctc-iwyu* ./bin/ctc-clang-format* ./bin/ctc-clang-tidy*

Tests

7 new parametrised cases (3 install-checks + 3 --version dispatch + 1 storage-sharing). 123 broader native-launcher regression suite passes. Pyright + ruff clean.

🤖 Generated with Claude Code