Currently there doesn't seem to be a way to pass shared library-specific flags
via a meson build option.
This patch allows the existing ldflags_sl to be set via a build option.
Patch created against the 17.4 release.
diff --git a/meson.build b/meson.build
index 42a4d25bfd7..68690e5de52 100644
--- a/meson.build
+++ b/meson.build
@@ -98,7 +98,7 @@ cxxflags_mod = []
ldflags = []
ldflags_be = []
-ldflags_sl = []
+ldflags_sl = get_option('ldflags_sl')
ldflags_mod = []
test_c_args = []
diff --git a/meson_options.txt b/meson_options.txt
index 246cecf3827..defeec3aafa 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -76,6 +76,8 @@ option('darwin_sysroot', type: 'string', value: '',
option('rpath', type: 'boolean', value: true,
description: 'Embed shared library search path in executables')
+option('ldflags_sl', type: 'array', value: [],
+ description: 'Shared library ldflags')
# External dependencies