Set -s AUTONATIVE_LIBRARIES=0

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: 741d41808d
This commit is contained in:
WeebDataHoarder 2022-06-23 09:37:40 +02:00 committed by Dmitry Lyzo
parent e9b67a2ed1
commit 163115879e

View File

@ -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']" \