Force_fallback is not an interpreter keyword argument, and there
is no reason to handle it as one since it is not used anywhere
else (and in fact is explicitly ignored by get_dep_identifier).
Use a Python keyword argument instead, which makes the code
simpler.
Automatic fallback to subprojects is complicated and should be
pointed out outside the "fallback" keyword argument. It is also
surprising that fallback to a subproject will not happen if
override_dependency has already been used with the request
dependency. Document all this.
Just saying "it failed" is accurate, but not useful to helping someone
figure out why it failed. Giving them the stdout and stderr (like we
might with compilers) should help people resolve the issue.
Fixes: #7173
Currently if you change the `choices` field in the meson_options.txt
file, no update will be done until `meson setup --wipe` is called. Now
if the choices change then the options will be properly merged.
If the currently select value is still valid it is guaranteed to be
kept, if it is now invalid the new default value will be used and a
warning will be printed.
Fixes#7386
`pathlib.Path.glob()` also returns directories that match source
filenames (i.e. a directory named `test.h/`), but `clang-format` and
`clang-tidy` fail when handed a directory. We manually skip calling
`clang-format` and `clang-tidy` on those directories.
This is required to make the various keys in the [user options] section
work the same as they do in the meson_options.txt file, where we don't
have any rules about case sensitivity.
There is some risk here. Someone may be relying on this lower by default
behavior, and this could break their machine files.
Fixes#7731
Projects that specify b_pie=true clutter build logs with the warning:
clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
No option is needed to produce PIE binaries because ld64 is making PIE
executables on 10.7 and above by default, as documented in ld(1).
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
The implementation of the link variant was what should have been the
compiler variant, and there was no valid compiler variant, which meant
it was getting C code.
This abstraction is really useful, and most compilers could use it
(including D). It also will allow the Gnu mixins to work properly
without the CLikeCompiler in their mro.
So that we can actually use it anyplace that an OptionDictType could be
used. I've also done a bit optimizing/simplifying of the implementation.
This is needed for cuda, as it returns an OptionOverrideProxy where we
ask for an OptionDicType
So that every subclass doesn't have to reimplement it. Especially since
the Gnu implementation moved out of the CCompiler and into the
GnuLikeCompiler mixin