Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off CMake compile launcher when using zig #13748

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Oct 4, 2024

This setting is for things like ccache, but if Meson treats zig that way, then it will expand the second argument to become:

/usr/bin/zig /usr/lib64/ccache/cc

in CMake and /usr/lib64/ccache/cc is not an argument to zig.

If you run

$ CC='zig cc' CXX='zig c++' ./meson.py setup 'test cases/cmake/1 basic' build

then CMake will fail to compile a "simple test program" and setup fails.

I'm not sure if this is the best place to check this, but is_cmdline_option is only used in the one place that enables the compile launcher.

@QuLogic QuLogic requested a review from mensinda as a code owner October 4, 2024 00:21
This setting is for things like `ccache`, but if Meson treats zig that
way, then it will expand the second argument to become:
```
/usr/bin/zig /usr/lib64/ccache/cc
```
in CMake and `/usr/lib64/ccache/cc` is _not_ an argument to `zig`.

If you run
```
$ CC='zig cc' CXX='zig c++' ./meson.py setup 'test cases/cmake/1 basic' build
```
then CMake will fail to compile a "simple test program" and setup
fails.
@dcbaker dcbaker merged commit eda59e1 into mesonbuild:master Oct 4, 2024
33 checks passed
@QuLogic QuLogic deleted the zig-cmake branch October 4, 2024 20:02
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