summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2021-02-16 12:56:47 -0500
committerChristopher Michael <devilhorns@comcast.net>2021-02-16 12:56:47 -0500
commit524b5dcc285948991c1c50b0099c54da2cac8b63 (patch)
tree56f8f89b78100cd5e2bb7baecbdfcf24de23f8ee
parent2257324eed31e9f0b2a9e69e1ab9efe0750fe7bf (diff)
express: Remove meson warnings about linker flags
This fixes a small issue where meson was warning about linker flags in compiler argument support checks.
-rw-r--r--meson.build17
1 files 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 = [
37 '-fdata-sections', 37 '-fdata-sections',
38 '-ffunction-sections', 38 '-ffunction-sections',
39 '-fno-strict-aliasing', 39 '-fno-strict-aliasing',
40 '-Wl,--gc-sections',
41 '-Wl,--as-needed',
42 '-Wl,--no-copy-dt-needed-entries',
43 '-Wshadow', 40 '-Wshadow',
44 '-Wstrict-prototypes', 41 '-Wstrict-prototypes',
45 '-Werror=pointer-arith', 42 '-Werror=pointer-arith',
@@ -52,6 +49,20 @@ foreach cf: express_cflags_try
52endforeach 49endforeach
53add_global_arguments(express_cflags, language: 'c') 50add_global_arguments(express_cflags, language: 'c')
54 51
52express_lflags = []
53if cc.has_link_argument('-Wl,--gc-sections')
54 express_lflags += '-Wl,--gc-sections'
55endif
56
57if cc.has_link_argument('-Wl,--as-needed')
58 express_lflags += '-Wl,--as-needed'
59endif
60
61if cc.has_link_argument('-Wl,--no-copy-dt-needed-entries')
62 express_lflags += '-Wl,--no-copy-dt-needed-entries'
63endif
64add_global_link_arguments(express_lflags, language: 'c')
65
55have_visibility_hidden = cc.has_argument('-fvisibility=hidden') 66have_visibility_hidden = cc.has_argument('-fvisibility=hidden')
56if have_visibility_hidden 67if have_visibility_hidden
57 add_global_arguments('-fvisibility=hidden', language: 'c') 68 add_global_arguments('-fvisibility=hidden', language: 'c')