Skip to content

Commit

Permalink
Merge pull request #52 from dmitrylyzo/flto
Browse files Browse the repository at this point in the history
[WeebDataHoarder] Enable LTO, EVAL_CTOR
  • Loading branch information
dmitrylyzo committed Mar 20, 2024
2 parents 3461d90 + 1631158 commit cd33894
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 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
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
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 Expand Up @@ -154,6 +154,7 @@ all-src:
# Dist Files
EMCC_COMMON_ARGS = \
$(LDFLAGS) \
-s AUTO_NATIVE_LIBRARIES=0 \
-s EXPORTED_FUNCTIONS="['_main', '_malloc']" \
-s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE="['\$$Browser']" \
-s EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap', 'getValue', 'FS_createPreloadedFile', 'FS_createPath']" \
Expand Down

0 comments on commit cd33894

Please sign in to comment.