diff --git a/CHANGELOG.md b/CHANGELOG.md index a3f2954b..d51d6d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,12 @@ Versioning](https://semver.org/spec/v2.0.0.html). library to replace Boost.Asio. - Fixed a deprecation warning in the Meson build, causing the minimum supported Meson version to be bumped up to **Meson 0.56** from 0.55. +- LTO has been explicitly enabled for all of the library targets. LTO doesn't + work with the plugin host Winelib binaries because of the way winegcc works, + but it's still useful for the plugin libraries so the option is now explicitly + enabled in the Meson build file for those targets. This is especially + important for the new chainloader libraries as they will otherwise pull in a + lot of code they don't actually need. ## [3.8.1] - 2022-03-08 diff --git a/meson.build b/meson.build index 691f761a..92d07f14 100644 --- a/meson.build +++ b/meson.build @@ -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