We support this in a machine file:
```
[binaries]
pkgconfig = 'pkg-config'
pkg-config = 'pkg-config'
```
and you can use either one, because internally we look up both. If you
only set *one* of them, this plays awkwardly with setting $PKG_CONFIG,
since we don't know which one you set in the machine file and the
*other* one will be initialized from the environment instead.
In commit 22df45a319 we changed program
lookup of config-tool style dependencies to use the regular tool names
and only fall back on the strange internal names. This affected the
pkg-config class too.
The result is that instead of preferring `pkgconfig =` followed by
$PKG_CONFIG followed by `pkg-config =`, we inverted the lookup order.
This is a good idea anyway, because now it behaves consistently with
`find_program('pkg-config')`.
Unfortunately, we documented the wrong name in a bunch of places, and
also used the wrong name in various testsuite bits, which meant that if
you set $PKG_CONFIG and then ran the testsuite, it would fail.
Correct these references, because they are buggy.
One test case expected to find_program() a native copy for convenience
of testing against natively installed glib. Force it to resolve a native
copy.
Partial revert of commit cf23e34187. This
mostly moved existing arguments to the "right" location, but also
introduced new arguments that didn't previously exist -- which was
wrong.
... also, these cross files are used by CI (if they have a corresponding
.json file) and this change broke the CI. Because --target isn't a valid
gcc option, although clang/rustc do accept it. For GCC, the argument
parser decides you wanted --target-help, which prints documentation text
and then quits.
c_args are meant to be overridden by the user if needed (even via the
environment CFLAGS variables + -Doptimization=plain, for example),
so they should not contain any option that affect the multilib search
path. For example, a hypothetical native file like this:
[binaries]
c = gcc
[built-in options]
c_args = ['-m32']
would *not* build 32-bit binaries if -Dc_args is passed to meson.
Such options, instead should be in the [binaries] section. Adjust
the sample cross files included with meson.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This is like the project options, but for meson builtin options.
The only real differences here have to do with the differences between
meson builtin options and project options. Some meson options can be set
on a per-machine basis (build.pkg_config_path vs pkg_config_path) others
can be set on a per-subproject basis, but should inherit the parent
setting.
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082