meson: Enable link time optimization
Currently local boost subproject compilation fails with a message:
"""
../subprojects/boost-1.84.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: I88a6779ae91936a8067ae4dbd8c685823cd2f28c
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
diff --git a/meson.build b/meson.build
index 72f3ccf..e1ee4f1 100644
--- a/meson.build
+++ b/meson.build
@@ -7,6 +7,7 @@
'werror=true',
'cpp_std=c++23',
'buildtype=debugoptimized',
+ 'b_lto=true',
]
)