Add LTO addin

This commit is contained in:
BtbN 2022-11-02 22:14:55 +01:00
parent 009c516860
commit fe0e366d93

7
addins/lto.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/bash
FF_CONFIGURE="$FF_CONFIGURE --enable-lto"
ffbuild_dockeraddin() {
to_df 'ENV CFLAGS="$CFLAGS -flto=auto" CXXFLAGS="$CXXFLAGS -flto=auto" LDFLAGS="$LDFLAGS -flto=auto"'
to_df 'ENV FFBUILD_TARGET_FLAGS="$FFBUILD_TARGET_FLAGS --ar=${FFBUILD_TOOLCHAIN}-gcc-ar --nm=${FFBUILD_TOOLCHAIN}-gcc-nm --ranlib=${FFBUILD_TOOLCHAIN}-gcc-ranlib"'
}