meson: Enable link time optimization
Currently local boost subproject compilation fails with a message:
"""
../subprojects/boost-1.83.0/libs/container/src/dlmalloc_ext_2_8_6.c:
1085:41: error: iteration 2305843009213693951 invokes undefined
behavior [-Werror=aggressive-loop-optimizations]
1085 | size = request2size(sizes[i]*element_size);
...
cc1: all warnings being treated as errors
"""
To solve the issue enable link time optimization.
Change-Id: I12bb95189da3da9ff6287c6c6c69da896f287c61
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
diff --git a/meson.build b/meson.build
index 8ac1ebc..db5c9a2 100644
--- a/meson.build
+++ b/meson.build
@@ -5,6 +5,7 @@
'warning_level=3',
'werror=true',
'cpp_std=c++23',
+ 'b_lto=true',
],
version: '1.0',
)