Since intl links internally to iconv, try to pull in iconv too, but only
if we specifically ask for static libs.
If PREFER_SHARED, we have no way to tell which type we got, so do not
try handling that...
Although find_library returns the library as a list of args, has_header
returns a tuple(is_found, is_cached) which is non-empty and thus always
true. Which is confusing...
Check whether it actually got found.
Just like we automatically provide some reusable glue for self.static,
provide it here too. It seems plausibly like something people would
commonly want.
Sonarcloud.io only can read the sonarqube based report that gcovr can
produce. This change enables support for this output in meson and
ninja.
Signed-off-by: Weston Schmidt <Weston_Schmidt@alumni.purdue.edu>
This works for `moc_*` and `ui_files`, but it never could have worked
for `qresources` due to the implementation assuming a `str` or `File`.
To restore previous compatibility I've added `CustomTarget` where it
would have worked, but not where it would have failed, the former would
raised an exception along the lines anyway.
Fixes#9007
If the command fails for one subproject we should still continue with
others. Failed subprojects are reported at the end.
This issue became more problematic when doing parallel tasks because the
reason the command fails was completely hidden by other parallel tasks.
g-ir-scanner does not convert relative -L paths to runtime paths which
are added to -Wl,-rpath and LD_LIBRARY_PATH / DYLD_LIBRARY_PATH
/ PATH. This means that the local library will either not be found at
runtime (while building introspection data), or the system-wide
library will be picked instead.
See: giscanner/ccompiler.py:get_internal_link_flags() in
gobject-introspection for more details.
For an ELF targets, shared_module() builds a module with SONAME field
(using -Wl,-soname argument). This is wrong: only the shared_library()
needs SONAME, while shared_module() does not. Moreover, tools such as
debian's dpkg-shlibdeps use presence of SONAME field as an indicator
that this is shared library as opposed to shared module (e.g., for the
module it is okay to have unresolved symbols which are imported from
the executable which loads the module, while a library should have all
symbols resolved).
This was in fact already the behavior on Darwin; extend it to ELF
targets as well.
Fixes: #8746
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
code coverage may be interesting to some people as an informational
update, but it's really fragile and sometimes obscure, and overall we
would really like to NOT have most PRs reporting a red X in the CI
overview, when all project/unittests succeeded but codecov decides that
by some inscrutbale metric, coverage by % has dropped.
Elegant refactorings are penalized, because removing lines of code or
rewriting them to be more compact, means the overall percentage of
covered code is "less", even though no uncovered code got added.
Even worse, the coverage reports often erroneously complain that a PR
has "added lines #L<num> - L<num> were not covered by tests" even though
github helpfully points out they are "Unchanged files with check
annotations". Or more generally, codecov claims that coverage has
dropped in code which the PR can't touch.
The whole thing is just too much of a source of trouble. So, configure
codecov to consider all PRs as successful no matter what. It is still
welcome to leave informational comments, though.
These were spotted by mypy and pyright. One is a string where a Path is
expected, another other is a possibly unbound variable, and the third is
bound but unused variables.
Both of these are artifacts of the time before Dependency Factories,
when a dependency that could be discovered multiple ways did ugly stuff
like finding a specific dependency, then replacing it's own attributes
with that dependency's attributes. We don't have cases of that left in
the tree, so let's get rid of this code too
Including not calling back into `Interpreter.func_*`, which is not a
good idea both from a type saftey and perforamance point of view.
Instead there's now a shared _impl method