Skip to content

Commit b8e63d8

Browse files
committed
lua: build scripts updated
1 parent 3f40984 commit b8e63d8

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

lua/build-linux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ patch -p1 -i ../../build.patch
1111

1212
make \
1313
PLAT=linux \
14-
MYCFLAGS="-fPIC" \
15-
MYLDFLAGS="-static -fPIC"
14+
MYCFLAGS="-fPIC -flto -fuse-linker-plugin -ffat-lto-objects" \
15+
MYLDFLAGS="-static -fPIC -flto -fuse-linker-plugin -ffat-lto-objects"
1616

1717
strip --strip-unneeded src/lua
1818
cp src/lua ../../lua-linux-$arch

lua/build-mingw-i686.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ make \
1010
PLAT=mingw \
1111
CC="i686-w64-mingw32-gcc -std=gnu99" \
1212
AR="i686-w64-mingw32-ar rc" \
13-
RANLIB="i686-w64-mingw32-ranlib"
13+
RANLIB="i686-w64-mingw32-ranlib" \
14+
MYCFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects" \
15+
MYLDFLAGS="-static -flto -fuse-linker-plugin -ffat-lto-objects"
1416

1517
i686-w64-mingw32-strip --strip-unneeded src/lua.exe
1618
cp src/lua.exe ../../lua-windows-i686.exe

lua/build-mingw-x86_64.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ make \
1010
PLAT=mingw \
1111
CC="x86_64-w64-mingw32-gcc -std=gnu99" \
1212
AR="x86_64-w64-mingw32-ar rc" \
13-
RANLIB="x86_64-w64-mingw32-ranlib"
13+
RANLIB="x86_64-w64-mingw32-ranlib" \
14+
MYCFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects" \
15+
MYLDFLAGS="-static -flto -fuse-linker-plugin -ffat-lto-objects"
1416

1517
x86_64-w64-mingw32-strip --strip-unneeded src/lua.exe
1618
cp src/lua.exe ../../lua-windows-x86_64.exe

0 commit comments

Comments
 (0)