forked from Dniel97/segatools
optimized meson.build to decrease filesize
This commit is contained in:
parent
f5f275c8e9
commit
f4a3a5f78d
@ -17,11 +17,13 @@ add_project_arguments(
|
|||||||
language: 'c',
|
language: 'c',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Use get_argument_syntax() instead once Meson 0.49.0 releases
|
cc = meson.get_compiler('c')
|
||||||
if meson.get_compiler('c').get_id() != 'msvc'
|
|
||||||
|
if cc.get_id() != 'msvc'
|
||||||
add_project_arguments(
|
add_project_arguments(
|
||||||
'-ffunction-sections',
|
'-ffunction-sections',
|
||||||
'-fdata-sections',
|
'-fdata-sections',
|
||||||
|
'-flto', # Enable Link-Time Optimization
|
||||||
language: 'c',
|
language: 'c',
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -30,11 +32,12 @@ if meson.get_compiler('c').get_id() != 'msvc'
|
|||||||
'-Wl,--exclude-all-symbols',
|
'-Wl,--exclude-all-symbols',
|
||||||
'-Wl,--gc-sections',
|
'-Wl,--gc-sections',
|
||||||
'-static-libgcc',
|
'-static-libgcc',
|
||||||
|
'-flto', # Enable Link-Time Optimization
|
||||||
|
'-Wl,-s', # Strip debug symbols
|
||||||
language: 'c',
|
language: 'c',
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
|
||||||
shlwapi_lib = cc.find_library('shlwapi')
|
shlwapi_lib = cc.find_library('shlwapi')
|
||||||
dinput8_lib = cc.find_library('dinput8')
|
dinput8_lib = cc.find_library('dinput8')
|
||||||
dxguid_lib = cc.find_library('dxguid')
|
dxguid_lib = cc.find_library('dxguid')
|
||||||
|
Loading…
Reference in New Issue
Block a user