GNUmakefile: smaller Rust binaries!

This commit is contained in:
Emma Tebibyte 2023-12-26 12:35:41 -07:00
parent 94ba336ee4
commit 83d6f0b2c2
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270

View File

@ -19,9 +19,10 @@ PREFIX=/usr/local
CC=cc
CFLAGS=-O3 -Lbuild/lib -idirafter include
RUSTC=rustc
RUSTCFLAGS=-C opt-level=z -C codegen-units=1 -C panic=abort -C lto=y \
-C strip=symbols
RUSTC=rustc +nightly
RUSTCFLAGS=-Zlocation-detail=none -Copt-level=z -Ccodegen-units=1 \
-Cpanic=abort -Clto=y -Cstrip=symbols -Ctarget-cpu=native \
-Clink-args=-Wl,-n,-N,--no-dynamic-linker,--no-pie,--build-id=none
ifeq ($(CC), gcc)
CFLAGS=-O3 -s -Wl,-z,noseparate-code,-z,nosectionheader -flto -Lbuild/lib \