Skip to content

Commit

Permalink
Set -s AUTONATIVE_LIBRARIES=0
Browse files Browse the repository at this point in the history
When -flto is enabled emscripten will generate "system libraries" cache, for all available libraries, including non-used ones.
This includes libGL.a, libal.a, libhtml5.a, which are not used in the project.
Disabling AUTONATIVE_LIBRARIES decreases compile time with -flto enabled.

Cherry-picked from: libass@741d418
  • Loading branch information
WeebDataHoarder authored and dmitrylyzo committed Mar 20, 2024
1 parent af9e6d6 commit a722bf2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
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 a722bf2

Please sign in to comment.