While adding link args for external deps, sometimes different libraries come from different prefixes, and an older version of the same library might be present in other prefixes and we don't want to accidentally pick that up. For example: /usr/local/lib/libglib-2.0.so /usr/local/lib/pkgconfig/glib-2.0.pc /usr/local/lib/libz.so /usr/local/lib/pkgconfig/zlib.pc /home/mesonuser/.local/lib/libglib-2.0.so /home/mesonuser/.local/lib/pkgconfig/glib-2.0.pc PKG_CONFIG_PATH="/home/mesonuser/.local/lib/pkgconfig/:/usr/local/lib/pkgconfig/" If a target uses `dependencies : [glib_dep, zlib_dep]`, it will end up using /usr/local/lib/libglib-2.0.so instead of /home/mesonuser/.local/lib/libglib-2.0.so despite using the pkg-config file in /home/mesonuser/.local/lib/pkgconfig because we reorder the -L flag and separate it from the -l flag. With this change, external link arguments will be added to the compiler list without de-dup or reordering. Closes https://github.com/mesonbuild/meson/issues/1718pull/1932/head
parent
f792641b34
commit
d23e6b34c7
4 changed files with 31 additions and 4 deletions
Loading…
Reference in new issue