From f4f69c9b99095416aaed18a73f7486ad9eb04aa9 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai@gmail.com>
Date: Mon, 17 Jan 2022 06:24:32 +0000
Subject: [PATCH] meson: Check version-script linker option before using

clang in mingw does not support version script linker option
---
 plparse/meson.build | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/plparse/meson.build b/plparse/meson.build
index cc3b221..eb37956 100644
--- a/plparse/meson.build
+++ b/plparse/meson.build
@@ -60,7 +60,9 @@ libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
 plparser_cflags = extra_warning_cflags + ['-DLIBEXECDIR="@0@"'.format(libexecdir)]
 
 symbol_map = 'plparser.map'
-symbol_link_args = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), symbol_map)
+symbol_link_args = cc.get_supported_link_arguments([
+  '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), symbol_map)
+  ])
 
 plparser_lib = library('totem-plparser',
                        plparser_sources, features_h,
@@ -96,7 +98,9 @@ plparser_mini_sources = [
 ]
 
 mini_symbol_map = 'plparser-mini.map'
-mini_symbol_link_args = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mini_symbol_map)
+mini_symbol_link_args = cc.get_supported_link_arguments([
+  '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mini_symbol_map)
+  ])
 
 plparser_mini_lib = library('totem-plparser-mini',
                             plparser_mini_sources,
-- 
GitLab

