Skip to content

Commit

Permalink
Enable -flto, -sEVAL_CTORS=1
Browse files Browse the repository at this point in the history
Do link-time optimizations and pre-evaluate code.

-s EVAL_CTORS=1 has no change in output currently.
-flto increases output size after optimizations
  • Loading branch information
WeebDataHoarder committed Jun 24, 2022
1 parent c8f02d6 commit ae80c98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
BASE_DIR:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
DIST_DIR:=$(BASE_DIR)dist/libraries

export LDFLAGS = -O3 -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1 -s STRICT_JS=1
export CFLAGS = -O3 -s USE_PTHREADS=0
export LDFLAGS = -O3 -s EVAL_CTORS=1 -flto -s ENVIRONMENT=web,webview,worker -s NO_EXIT_RUNTIME=1 -s STRICT_JS=1
export CFLAGS = -O3 -flto -s USE_PTHREADS=0
export CXXFLAGS = $(CFLAGS)
export PKG_CONFIG_PATH = $(DIST_DIR)/lib/pkgconfig
export EM_PKG_CONFIG_PATH = $(PKG_CONFIG_PATH)
Expand Down

0 comments on commit ae80c98

Please sign in to comment.