From ea4c85bfa24c78bd5b99f98bcbe131fa7ab0d0d9 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Mon, 4 Oct 2021 23:37:37 +1100 Subject: [PATCH] Add comment re previous commit (strip examples) --- build-example.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build-example.sh b/build-example.sh index da17f529..94d118ad 100755 --- a/build-example.sh +++ b/build-example.sh @@ -23,11 +23,14 @@ if [ ! -e release/c/wuffs-unsupported-snapshot.c ]; then fi CC=${CC:-gcc} -CFLAGS=${CFLAGS:--O3 -fdata-sections -ffunction-sections -Wl,--gc-sections} CXX=${CXX:-g++} -CXXFLAGS=${CXXFLAGS:--O3 -fdata-sections -ffunction-sections -Wl,--gc-sections} LDFLAGS=${LDFLAGS:-} +# The "-fdata-sections -ffunction-sections -Wl,--gc-sections" produces smaller +# binaries. See commit 41fce8a8 "Strip examples of unused data and functions". +CFLAGS=${CFLAGS:--O3 -fdata-sections -ffunction-sections -Wl,--gc-sections} +CXXFLAGS=${CXXFLAGS:--O3 -fdata-sections -ffunction-sections -Wl,--gc-sections} + mkdir -p gen/bin sources=$@