CMake's write_basic_package_version_file has supported since version 3.14
an ARCH_INDEPENDENT option that makes it skip its architecture check in
the Version file.
With this patch Meson now supports it as well, and the change is also
compatible with older CMake versions, as they will simply ignore the
option.
This also slightly changes the contents of the generated Version file
when arch_independent is not set: previously, the if() needed to skip
the arch check was always filled with an empty string, while CMake puts
"FALSE" (or "TRUE") in it. Now, that if() will always be filled with
either "False" or "True", better matching CMake's behaviour.
This was a nice idea in theory, but in practice it had various problems:
- On the only platform where ldconfig is expected to be run, it is
really slow, even when the user uses a non-default prefix and ldconfig
doesn't even have permission to run, nor can do anything useful due to
ld.so.conf state
- On FreeBSD, it bricked the system: #9592
- On cross builds, it should not be used and broke installing, because
ldconfig may not be runnable without binfmt + qemu: #9707
- it prints weird and confusing errors in the common "custom prefix"
layout: #9241
Some of these problems can be or have been fixed. But it's a constant
source of footguns and complaints and for something that was originally
supposed to be just "it's the right thing to do anyway, so just do it
automatically" it is entirely too risky.
Ultimately I do not think there is justification for keeping this
feature in since it doesn't actually make everyone happy. Better for
users to decide whether they need this themselves.
This is anyways the case for cmake and autotools and generally any other
build system, so it should not be too intimidating...
Fixes#9721
It used to support:
- a single string
- an array of anything
And as long as CustomTarget supported it too, everything worked fine.
So, a `files('foo')` worked but a `files('foo')[0]` did not, which is
silly... and it's not exactly terrible to use files() here, the input is
literally a list of source files.
Fixes building gnome-terminal
Fixes#9827
Test updated by Nirbheek Chauhan <nirbheek@centricular.com>
It is unmaintained, broken (frequently for long periods of time) and not
really required for any meson functionality. Its purpose is to be used
as a one-shot tool for creating a distro package recipe, and then
deleted from your meson.build files.
Due to its fragile dependency on coredata implementation details, we
cannot assume it will reliably work, or continue to work, without
someone who is actively willing to take responsibility for it.
Even if that were to happen, this might be better off as an external
script that parses introspection data.
Closes#9764Closes#9763
This is another toolchain also called `armclang`, but it is not a cross
compiler like Keil's `armclang`. It is essentially the same as `clang`
based on its interface and CMake's support of the toolchain.
Use an `armltd` prefix for the compiler ID.
Fixes: #7255
Add ability to mutate a target's `extra_files` list through the
rewriter.
The logic is copied from sources add/rm, but changes the `extra_files`
kwarg instead of the sources positional argument.
Has additional logic to handle creating the `extra_files` list if it
doesn't exist.
There are thee arguments that are passed directly to CustomTarget which
are not in the permittedKwargs: depends, depend_files, and build_always.
The first two are obviously generically useful, as they allow creating
correct ordering. The latter, not so much. Since it was an error to pass
it, we'll just delete it.
generate_gir forces building both the typelib and gir, and some people
only want one or the other (probably only the typelib?) which means
flagging the other as install_dir: false in the same way custom_target
supports.
As this always worked, albeit undocumented, make sure it keeps working.
It's pretty reasonable to allow, anyway.
Fixes https://github.com/mesonbuild/meson/pull/9484#issuecomment-980131791