Expose the fragment (aka cli argument) parsing code we have for
pkgconfig as a module function and wrap it in a nice api in
dependencies.meson. This should fix issues where libraries are added to
link_args and don't end up in the right spot on the link line
Implement full Vala language support using a two-stage compilation
approach: Vala source files are first transpiled to C code using valac
--ccode, then the generated C code is compiled to object files using the
C compiler.
Changes:
- Add Vala to exposed compiler languages in toolchains.h
- Configure valac in toolchains.meson with compile_only and output
handlers
- Implement write_vala_two_stage_compilation() helper in build_target.c
- Register both Vala and C compilers for Vala source files
- Add .vala and .vapi file extension handling
- Add VALAC environment variable support
- Include test case
closes#209
We no longer use getopt, but a bespoke parser loosely inspired by
https://github.com/skeeto/scratch/blob/master/parsers/imgo.c.
The purpose of this is to reduce duplication. Currently for every cli
flag we need to list it a total of 4 times. Once in the optstring, once
in the switch statement, once in the cli help (-h), and ideally once in the man
page (which is easy to forget). The new api should function exactly
like posix getopt, but allows us to only specify flags in one place and
generate all docs necessary. Additionally, the docs are available and
searchable using muon help.
The signature generation isn't super relevant anymore and hasn't been
maintained for a few versions. It has been superseded by the generated
reference docs.
The motivation for this was to skip freeing the base arenas in release
builds, since this is pointless, and can take surprisingly long after
evaluating particularly long scripts.
This consists of essentially a rewrite of the toolchain detection to
make it more modular, as well as improvements to the analyzer and c <->
meson interface, particularly around enums. This is to ensure that we
don't lose any robustness by having toolchain definitions in script
modules.