summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTing-Wei Lan <lantw@src.gnome.org>2019-12-28 23:57:18 +0800
committerRichard Hughes <richard@hughsie.com>2021-10-10 16:56:35 +0100
commit2b2efe3887dafc844584ab57d14a69524f5dc45b (patch)
tree646968bf0d1acc0792420507a75a76d503657ee5
parenta0d6f504f0c1c38599acf254771c6dc6d1829ea3 (diff)
downloadgusb-2b2efe3887dafc844584ab57d14a69524f5dc45b.tar.gz
Don't hard-code the list of OS supporting --version-script
Instead of keeping a list of OS in the build file, it should be better to run a check to determine if it is supported by the linker.
-rw-r--r--gusb/meson.build5
1 files changed, 3 insertions, 2 deletions
diff --git a/gusb/meson.build b/gusb/meson.build
index 7093051..c01bbed 100644
--- a/gusb/meson.build
+++ b/gusb/meson.build
@@ -44,8 +44,9 @@ install_headers([
mapfile = 'libgusb.ver'
vflag = []
-if host_machine.system() not in ['darwin']
- vflag += '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
+vflag_test = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
+if cc.has_link_argument(vflag_test)
+ vflag += vflag_test
endif
gusb = library(
'gusb',