In Fedora 30 the llvm-config binary has the number of bits in the isa
added as a suffic to the name llvm-config-64 or llvm-config-32, and no
naked llvm-config binary is provided. This commit moves the list of
llvm-config binaries to the constructor so that we can modify the list
on a per-instance basis, and adds the new Feodra names.
Fixes#5059
Fix 'not founded' message for packages with another name for
specific configurations instead of just 'library'.
Signed-off-by: Luís Ferreira <lsferreira169@gmail.com>
When building for iOS, the Qt binaries only contain static libraries
and headers. No framework.
With this, Meson can successfully compile and link to Qt on iOS
Instead of only doing a naive filesystem search, also run the linker
so that it can tell us whether the -F path specified actually contains
the framework we're looking for.
Unfortunately, `extraframework` searching is still not 100% correct in
the case when since we want to search in either /Library/Frameworks or
in /System/Library/Frameworks but not in both. The -Z flag disables
searching in those prefixes and would in theory allow this, but then
you cannot force the linker to look in those by manually adding -F
args, so that doesn't work.
Also add a test for it. In the process, also remove an overly-zealous
try..except statement that was catching *all* exceptions, not just
expected ones, which was masking programming errors.
.get_command() will return None when it's not found, so there's no
point trying to print that. Print self.name instead, which is what
we tried to search for.
First, I noticed there was a dangling use of now-removed cross_info in
the CMake lookup. No tests had caught this, but it means that CMake deps
were totally broken. [It also meant that CMake could not be specified
from a native file.]
In a previous of mine PR which removed cross_info, I overhauled finding
pkg-config a bit so that the native and cross paths were shared. I
noticed that the CMake code greatly resembled the pkg-config code, so I
set about fixing it to match.
I then realized I could refactor things further, separating caching,
finding alternatives, and validating them, while also making the
validations less duplicated. So I ended up changing pkg config lookup a
lot too (and CMake again, to keep matching).
Overall, I think I have the proper ideom for tool lookup now, repated in
two places. I think it would make sense next to share this logic between
these two, compilers, static linkers, and any other tool similarly
specifiable. Either the `BinaryTable` class in environment.py, or a new
class for `Compiler` and friends to subclass, would be good candidates
for this.
In recent change, dependency('foo') does not return a not-found
PkgConfigDependency any more, but a NotFoundDependency object. This
creates a regression in gst-build that does
dependency('foo').get_partial_dependency() causing Meson to raise an
exception.
The returned not-found object can be from any type because we were
returning the first of the failed attempts. It also can happen that we
don't have any dependency object in which case we should just return
NotFoundDependency() object as well instead of raising an exception.
That exception was happening before, but dependency_impl() was
calling find_external_dependency() in a try block so it was hidden.
When req_version is None (e.g. pcap-config case) it gets printed in the
logs.
Take this opportunity to reformat the message to look more like
ExternalProgram messages.