From 3de69526447a58a9656790e4d711d64a7b54eb0e Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Sat, 16 May 2026 21:45:10 +0900 Subject: [PATCH 1/2] make.yml: reduce binary size * replace manuall strip by RUSTFLAGS * use linker flags useful to reduce binary size * remove unwind table by -C force-unwind-tables=no. Unwind tables are useful for debug. but we publish milti-call binary containing them from CICD.yml and individual binaries from size CI. So we dont hurt debuggability for size bench. --- .github/workflows/make.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index f96de558bcd..0c72c21c996 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -1,7 +1,7 @@ name: make # spell-checker:ignore (abbrev/names) CACHEDIR taiki -# spell-checker:ignore (env/flags) CHERE RUSTDOCFLAGS RUSTFLAGS CARGOFLAGS CLEVEL +# spell-checker:ignore (env/flags) CHERE RUSTDOCFLAGS RUSTFLAGS CARGOFLAGS CLEVEL relocs # spell-checker:ignore (jargon) deps softprops toolchain # spell-checker:ignore (people) dawidd # spell-checker:ignore (shell/tools) bsdtar nextest pacman sccache zstd @@ -34,6 +34,8 @@ concurrency: jobs: build_makefile: name: Build/Makefile and measure binary size + env: + RUSTFLAGS: "-C force-unwind-tables=no -C strip=symbols -Clink-arg=-z -Clink-arg=pack-relative-relocs" permissions: contents: write # Publish individual binaries runs-on: ${{ matrix.job.os }} @@ -144,7 +146,6 @@ jobs: run: | # Check that libstdbuf is present too mv target/release/deps/libstdbuf.so -t /tmp/individual/usr/local/bin - strip -s /tmp/individual/usr/local/bin/* ZSTD_CLEVEL=19 tar --zstd -caf individual-x86_64-unknown-linux-gnu.tar.zst -C /tmp/individual/usr/local bin - name: Publish uses: softprops/action-gh-release@v3 From 071ea1e062f9e955054ef7a71554a2a788e605c6 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Thu, 21 May 2026 01:47:05 +0900 Subject: [PATCH 2/2] make.yml: add comment about binary size Co-authored-by: Sylvestre Ledru --- .github/workflows/make.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 0c72c21c996..ad3dde53519 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -35,6 +35,7 @@ jobs: build_makefile: name: Build/Makefile and measure binary size env: + # to reduce the size: RUSTFLAGS: "-C force-unwind-tables=no -C strip=symbols -Clink-arg=-z -Clink-arg=pack-relative-relocs" permissions: contents: write # Publish individual binaries