Skip to content

envconfig: recognize kache as a compiler wrapper - #15997

Open
Guara92 wants to merge 1 commit into
mesonbuild:masterfrom
Guara92:patch-1
Open

envconfig: recognize kache as a compiler wrapper#15997
Guara92 wants to merge 1 commit into
mesonbuild:masterfrom
Guara92:patch-1

Conversation

@Guara92

@Guara92 Guara92 commented Jul 11, 2026

Copy link
Copy Markdown

Setting a compiler wrapper meson doesn't know about, e.g. CC="kache cc" (kache is a compiler cache), breaks Rust projects: the wrapper ends up in the compiler exelist and rust compiler detection promotes it to the linker:

    meson.build:1:0: ERROR: Compiler rustc -C linker=kache -C link-arg=cc cannot compile programs.

This teaches parse_entry about kache, following what #9428 did for sccache, plus a detect_kache() used to validate that the binary exists.

Autodetection is deliberately not added: kache's CLI only accepts specific compiler subcommands (kache cc, kache c++), so prepending it to arbitrary compilers wouldn't be safe.

FWIW, cc-rs recently added kache to its known compiler wrappers for the same reason.

@Guara92
Guara92 requested a review from jpakkane as a code owner July 11, 2026 14:23
@dcbaker dcbaker added this to the 1.13 milestone Jul 13, 2026
@dcbaker

dcbaker commented Jul 13, 2026

Copy link
Copy Markdown
Member

This needs release notes and probably some documentation around the same areas with ccache and sccache

Comment thread mesonbuild/envconfig.py
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