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
It looks as though the executable for valac (and other compilers) is hard coded in /mesonbuild/environment.py :
defdetect_vala_compiler(self):
exelist= ['valac']
When developing the Vala compiler it is useful to build programs against a newly patched version of valac. With C the HowToX suggests the CC variable can be used:
Set compiler
When first running Meson, set it in an environment variable. $ CC=mycc meson <options>
Is this the best way? So for Vala it would be: $ VALAC=/home/development-vala/installed/bin/valac meson <options>
Another, maybe clearer, approach is to treat this as a cross compilation. So a cross file is created with the relevant binaries:
We should definitely read VALAC. I thought we already did that, but I just checked and we don't.
Treating the run as a cross-compilation is wrong though, because it has several non-obvious effects (such as, tests won't be run without an exe_wrapper, built programs won't be run, etc). However, we were discussing a dependency file of sorts, so maybe it's good to extend that to also include this.
I'll rename this bug to be about VALAC specifically. In the meantime, I recommend symlinking that valac inside ~/.local/bin and adding that to your PATH.
nirbheek
changed the title
Best way to set alternative compiler paths?
Allow setting the path to the Vala compiler using the VALAC env variable
Apr 21, 2017
It looks as though the executable for valac (and other compilers) is hard coded in /mesonbuild/environment.py :
When developing the Vala compiler it is useful to build programs against a newly patched version of valac. With C the HowToX suggests the
CC
variable can be used:Is this the best way? So for Vala it would be:
$ VALAC=/home/development-vala/installed/bin/valac meson <options>
Another, maybe clearer, approach is to treat this as a cross compilation. So a cross file is created with the relevant binaries:
Then this is compiled with:
meson build --cross-file development_vala.txt
Thoughts?
The text was updated successfully, but these errors were encountered: