helpers: Refactor $LIB, $PLATFORM detection
Compare changes
helpers/haswell/meson.build
0 → 100644
+ 14
− 0
helpers: Open-code build files instead of generating them
Generating files in the source directory is ugly, and open-coding the build instructions that we would have generated isn't a whole lot more code.
helpers: Check for $LIB = lib32, lib64 generically
pressure-vessel is currently x86-only, but we want to be portable to non-x86 if it's easy to do. It's reasonably common for all architectures to use lib, lib32 or lib64 for $LIB.
helpers: Generically check for $LIB = lib/MULTIARCH or MULTIARCH
There's no real reason why we need to hard-code the x86 architectures here - we can do this generically across all multiarch tuples. In particular, this means we detect $LIB correctly on all Debian derivatives and in the freedesktop.org SDK, even on non-x86.
helpers: Make $PLATFORM detection more generic
We can make a pretty good guess at what $PLATFORM will be: on many CPU architectures, there is one well-known name for the architecture, and $PLATFORM always takes that value. We might as well try it, even on otherwise unknown architectures - the worst that can happen is that our guess was wrong.
Known exceptions include:
of which we are unlikely to care about the non-x86 cases in practice.
Followup from !297 (merged).