An exercise in stripping down the win32 .exe size.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 7m12s

This commit is contained in:
Cory McWilliams 2024-07-24 15:25:36 -04:00
parent c5a80b68ca
commit ca05d402a7
2 changed files with 54 additions and 3 deletions

View File

@ -178,11 +178,13 @@ $(WINDOWS_TARGETS): CFLAGS += \
-D_WIN32_WINNT=0x0A00 \
-DWINVER=0x0A00 \
-DNTDDI_VERSION=NTDDI_WIN10 \
-Ideps/openssl/mingw64/usr/local/include
-Ideps/openssl/mingw64/usr/local/include \
-flto
$(WINDOWS_TARGETS): LDFLAGS += \
-static \
-lm \
-Ldeps/openssl/mingw64/usr/local/lib
-Ldeps/openssl/mingw64/usr/local/lib \
-flto
ifeq ($(UNAME_S),Darwin)
$(MACOS_TARGETS): CC = xcrun clang
$(IOS_TARGETS): IOS_SYSROOT := $(shell xcrun --sdk iphoneos --show-sdk-path)

View File

@ -13,7 +13,56 @@ rm -rf $WORK_DIR
cp -arf deps/openssl_src/ $WORK_DIR
build_the_thing() {
export GLOBAL_OPTIONS="no-trace no-asm no-threads no-md2 no-md4 no-dso no-async no-multiblock no-dgram no-filenames no-shared no-ssl3 no-engine no-dynamic-engine no-zlib no-comp no-psk no-idea no-srp no-weak-ssl-ciphers no-dtls no-egd no-tests -Os"
export GLOBAL_OPTIONS="
no-apps
no-asm
no-async
no-autoerrinit
no-cmp
no-cms
no-comp
no-deprecated
no-dgram
no-docs
no-dsa
no-dso
no-dtls
no-dynamic-engine
no-ec2m
no-egd
no-engine
no-err
no-filenames
no-gost
no-http
no-idea
no-legacy
no-md2
no-md4
no-module
no-multiblock
no-nextprotoneg
no-ocsp
no-psk
no-shared
no-sock
no-srp
no-ssl-trace
no-ssl3
no-stdio
no-tests
no-thread-pool
no-threads
no-trace
no-ui-console
no-uplink
no-weak-ssl-ciphers
no-zlib
-Os
-ffunction-sections
-fdata-sections
-flto
-DOPENSSL_SMALL_FOOTPRINT"
echo "./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS" && \
./Configure $SSL_TARGET $OPTIONS $GLOBAL_OPTIONS && \
make clean && \