mirror of
https://github.com/systemd/systemd.git
synced 2024-11-23 10:13:34 +08:00
meson: use -f{function,data}-sections for optimized builds
This commit is contained in:
parent
0da6f39619
commit
41afb5eb72
15
meson.build
15
meson.build
@ -303,6 +303,21 @@ foreach arg : ['-Wl,-z,relro',
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if get_option('buildtype') != 'debug'
|
||||
foreach arg : ['-ffunction-sections',
|
||||
'-fdata-sections']
|
||||
if cc.has_argument(arg)
|
||||
add_project_arguments(arg, language : 'c')
|
||||
endif
|
||||
endforeach
|
||||
|
||||
foreach arg : ['-Wl,--gc-sections']
|
||||
if cc.has_argument(arg)
|
||||
add_project_link_arguments(arg, language : 'c')
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
|
||||
cpp = ' '.join(cc.cmd_array()) + ' -E'
|
||||
|
||||
#####################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user