Skip to content

tests: stop Meson picking up a compiler launcher - #40

Merged
LalitMaganti merged 1 commit into
mainfrom
conformance-plain-toolchain-setup
Sep 16, 2026
Merged

LalitMaganti merged 1 commit into
mainfrom
conformance-plain-toolchain-setup

Conversation

@LalitMaganti

Copy link
Copy Markdown
Owner

main is still red: #39 fixed Make and CMake, which resolve cc through
PATH, but not meson-ninja.

Meson does not take whatever is in front of the compiler on PATH. It goes
looking for a ccache binary itself, finds /usr/bin/ccache, and writes
/usr/bin/ccache cc into build.ninja, so no amount of PATH filtering
helps. It does leave the compiler alone when it is told which one to use, so
the fixture now names it.

The fixture also has to apply to the whole test rather than the recording
alone, since CMake and Meson resolve the compiler when they configure, which
happens before recording starts, and write the result into their build files.

Verified on Linux with ccache installed and /usr/lib64/ccache first on
PATH, which is the CI condition: meson-ninja and cmake-ninja no longer
mention ccache at all, and the suite is 43 passed, 2 skipped. The two are
deselected there only because that machine's gcc drives as through sh,
which is a pre-existing difference on Fedora and not seen on Ubuntu.

Taking the launcher directories off PATH fixed Make and CMake, which resolve
cc through PATH, but not Meson: it looks for a ccache binary of its own accord
and writes `/usr/bin/ccache cc` into build.ninja. Meson leaves the compiler
alone once it is told which one to use, so name it.
@LalitMaganti
LalitMaganti merged commit 5a695ed into main Sep 16, 2026
11 checks passed
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