devilhorns pushed a commit to branch master.

http://git.enlightenment.org/apps/express.git/commit/?id=524b5dcc285948991c1c50b0099c54da2cac8b63

commit 524b5dcc285948991c1c50b0099c54da2cac8b63
Author: Christopher Michael <devilho...@comcast.net>
Date:   Tue Feb 16 12:56:47 2021 -0500

    express: Remove meson warnings about linker flags
    
    This fixes a small issue where meson was warning about linker flags in
    compiler argument support checks.
---
 meson.build | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index b8497f9..6293773 100644
--- a/meson.build
+++ b/meson.build
@@ -37,9 +37,6 @@ express_cflags_try = [
   '-fdata-sections',
   '-ffunction-sections',
   '-fno-strict-aliasing',
-  '-Wl,--gc-sections',
-  '-Wl,--as-needed',
-  '-Wl,--no-copy-dt-needed-entries',
   '-Wshadow',
   '-Wstrict-prototypes',
   '-Werror=pointer-arith',
@@ -52,6 +49,20 @@ foreach cf: express_cflags_try
 endforeach
 add_global_arguments(express_cflags, language: 'c')
 
+express_lflags = []
+if cc.has_link_argument('-Wl,--gc-sections')
+  express_lflags += '-Wl,--gc-sections'
+endif
+
+if cc.has_link_argument('-Wl,--as-needed')
+  express_lflags += '-Wl,--as-needed'
+endif
+
+if cc.has_link_argument('-Wl,--no-copy-dt-needed-entries')
+  express_lflags += '-Wl,--no-copy-dt-needed-entries'
+endif
+add_global_link_arguments(express_lflags, language: 'c')
+
 have_visibility_hidden = cc.has_argument('-fvisibility=hidden')
 if have_visibility_hidden
   add_global_arguments('-fvisibility=hidden', language: 'c')

-- 


Reply via email to