From d7d80945ea00f3536fd529a8f61ca3351fef4a2d Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 26 Feb 2021 11:52:48 -0800 Subject: [PATCH] rust: a meson -l argument could be etiher a static or dynamic library I made an incorrect assumption that -l arguments would always be static libraries, but they might well be shared libraries. --- mesonbuild/backend/ninjabackend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index b7723ef79..240cc0a09 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1624,8 +1624,8 @@ int dummy; elif a.startswith('-L'): args.append(a) elif a.startswith('-l'): - # This should always be a static lib, I think - args.extend(['-l', f'static={a[2:]}']) + _type = 'static' if e.static else 'dylib' + args.extend(['-l', f'{_type}={a[2:]}']) for d in linkdirs: if d == '': d = '.'