You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The binary cpp is the C preprocessor, not the C++ compiler. My build scripts use cpp to preprocess linker scripts and use find_program('cpp'). When following the docs at https://mesonbuild.com/Machine-files.html, you are guided to set cpp to the C++ compiler e.g. G++. This is wrong and results in my build failing as now find_program returns the C++ compiler, which is obviously incorrect.
To Reproduce
Set cpp in a cross file as instructed in the link above. Now find_program for cpp incorrectly picks up the C++ compiler.
Expected behavior
The C preprocessor is picked up.
I believe this may be just a documentation issue - or there may be more ominous/deeper problems at play here!
The text was updated successfully, but these errors were encountered:
This is an unfortunate side effect of the fact that the language name used by meson is 'cpp' instead of 'cxx'.
It's annoyed me before but I'm not sure exactly what to do about it.
Worth noting: meson's compiler object has a preprocess method which you can use to get at the preprocessor and produce an output. You can try using that instead.
Somewhat ironically, that preprocess method allows for explicit (not file based) target ordering requirements via depends which is exactly what we've been discussing over at #8123...
Describe the bug
The binary
cpp
is the C preprocessor, not the C++ compiler. My build scripts usecpp
to preprocess linker scripts and usefind_program('cpp')
. When following the docs at https://mesonbuild.com/Machine-files.html, you are guided to setcpp
to the C++ compiler e.g. G++. This is wrong and results in my build failing as now find_program returns the C++ compiler, which is obviously incorrect.To Reproduce
Set
cpp
in a cross file as instructed in the link above. Now find_program for cpp incorrectly picks up the C++ compiler.Expected behavior
The C preprocessor is picked up.
I believe this may be just a documentation issue - or there may be more ominous/deeper problems at play here!
The text was updated successfully, but these errors were encountered: