add_project_arguments(['-fanalyzer'], language: 'c')
endif
+link_args = []
+if get_option('sections').enabled()
+ add_project_arguments(['-ffunction-sections'], language: 'c')
+ link_args += [
+ '-Wl,--gc-sections',
+ '-Wl,--print-gc-sections',
+ ]
+endif
+
msgfmt = find_program('msgfmt', required: get_option('nls'))
if msgfmt.found()
source_root = meson.current_source_dir()
include_directories: [labwc_inc],
dependencies: labwc_deps,
install: true,
+ link_args: link_args,
)
install_data('data/labwc.desktop', install_dir: get_option('datadir') / 'wayland-sessions')
option('nls', type: 'feature', value: 'auto', description: 'Enable native language support')
option('static_analyzer', type: 'feature', value: 'disabled', description: 'Run gcc static analyzer')
option('test', type: 'feature', value: 'disabled', description: 'Run tests')
+option('sections', type: 'feature', value: 'disabled', description: 'Show unused functions')