Enable LTO for the non-Winelib targets

This commit is contained in:
Robbert van der Helm
2022-04-16 14:59:35 +02:00
parent 46af07748b
commit e9c8c69a80
2 changed files with 16 additions and 0 deletions
+10
View File
@@ -254,6 +254,11 @@ shared_library(
tomlplusplus_dep,
],
cpp_args : compiler_options,
# LTO currently doesn't work with winelibs, so instead we'll explicitly enable
# it for all other targets (which is extra important for the chainloaders as
# they'd otherwise pull in a bunch of unused symbols) without affecting the
# Wine plugin host binaries
override_options : ['b_lto=true'],
)
if with_vst3
@@ -278,6 +283,11 @@ if with_vst3
vst3_sdk_native_dep,
],
cpp_args : compiler_options,
# LTO currently doesn't work with winelibs, so instead we'll explicitly
# enable it for all other targets (which is extra important for the
# chainloaders as they'd otherwise pull in a bunch of unused symbols)
# without affecting the Wine plugin host binaries
override_options : ['b_lto=true'],
)
endif