Skip to content

WIP: meson: Don't hardcode the default shared library prefix

Jon Turney requested to merge jturney/mesa:cygwin-shared-library-prefix-fix into main

Notwithstanding the current meson documentation, the default behaviour of name_prefix is more complex than "'lib' unless MSVC Windows, then ''".

Write 'name_prefix: []' to get the host-appropriate default behaviour, rather than assuming it's 'lib'.

Unfortunately, that feature is not working in many meson versions (See https://github.com/mesonbuild/meson/pull/6958).

Refine 63f5aee6 so we use the default shared library name prefix, except on Windows, where we use 'lib' (rather than the default of no prefix).

Refine 1a058119 similarly, so we use the default shared library name prefix, except on Windows, where we use no prefix with all toolchains.

This allows the correct default shared library prefix to be used on Cygwin (which is 'cyg' for the shared library, but 'lib' for the import library, for complex historical reasons).

Edited by Jordan Justen

Merge request reports