summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2020-12-15 11:19:39 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2020-12-15 11:19:39 +0000
commita5986f0dcddf4c82ed95ca79bd855fca71b21887 (patch)
tree40575c146e8a648b3e45ea9d2be95e3282135e81 /meson.build
parentc162d7148ffb9a6a6130b8a275af412e81b837a9 (diff)
downloadgtk+-a5986f0dcddf4c82ed95ca79bd855fca71b21887.tar.gz
build: Use get_supported_link_arguments()
Instead of hand-coding it ourselves, let Meson deal with linker arguments discovery.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 5 insertions, 9 deletions
diff --git a/meson.build b/meson.build
index f4a8e36f03..dc34c09123 100644
--- a/meson.build
+++ b/meson.build
@@ -319,15 +319,11 @@ if get_option('default_library') != 'static'
endif
endif
-common_ldflags = []
-
-if os_unix and not os_darwin
- foreach ldflag: [ '-Wl,-Bsymbolic', '-Wl,-z,relro', '-Wl,-z,now', ]
- if cc.links('int main () { return 0; }', name: ldflag, args: ldflag)
- common_ldflags += [ ldflag ]
- endif
- endforeach
-endif
+common_ldflags = cc.get_supported_link_arguments([
+ '-Wl,-Bsymbolic',
+ '-Wl,-z,relro',
+ '-Wl,-z,now',
+])
confinc = include_directories('.')
gdkinc = include_directories('gdk')