From ebe96eb8070d72c74a447ce06037e7b88ebdee40 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 25 Feb 2024 10:12:20 +0000 Subject: win32: add a comment about LTO to mkrelease --- examples/mswin-build/mkrelease | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/mswin-build/mkrelease b/examples/mswin-build/mkrelease index 51dd3346b..6dfd6c87e 100755 --- a/examples/mswin-build/mkrelease +++ b/examples/mswin-build/mkrelease @@ -42,10 +42,15 @@ do cd $i make ${CONFIG} - # TODO: add optimisations for clang/aarch64 build + + # The clang/aarch64 build is not subject to optimisation. The + # '-flto' option increased the size of the binary slightly (0.23%) + # and decreased the time to run the testsuite slightly (0.33%). + # It hardly seems worth bothering about. + # if [ $i != "build_64a" ] then - # link time optimisation, fortify, stack protection + # link time optimisation, stack protection sed -e 's/^CONFIG_EXTRA_CFLAGS="\(.*\)"$/CONFIG_EXTRA_CFLAGS="\1 -flto -fstack-protector --param=ssp-buffer-size=4"/' \ -e 's/^CONFIG_EXTRA_CFLAGS=" /CONFIG_EXTRA_CFLAGS="/' \ -e 's/^CONFIG_EXTRA_LDLIBS="\(.*\)"$/CONFIG_EXTRA_LDLIBS="\1 -l:libssp.a"/' \ -- cgit v1.2.3-55-g6feb