Whoops, thanks for making me aware of WASM_OBJECT_FILES being 1 by default... I've been building with LTO all the time (since the asm.js days) and was expecting that the WASM backend would behave identically there.
-Floh. On Friday, 28 February 2020 10:07:11 UTC+1, Gabriel CV wrote: > > Hi, > > Try to remove --llvm-lto 3, as it might increase binary size significantly > when combined with -O2 or -O3 (and I am not sure it is very usefull without > using -DWASM_OBJECT_FILES=0) > Le 28/02/2020 à 08:12, Rohit Saini a écrit : > > Hi All, > > Previously we were using 1.38.28 emscripten version. Recently we updated > to latest llvm backend 1.39.7. But with new backend there is drastic > increase in wasm size. Size of my side modules become almost double and > size of my main module also increased from 2.7mb to almost 4mb. Firstly we > are compiling to object files then we are linking them to make wasm. Below > are the flags I am passing while compiling and linking. Is this size > increase intentional or do I have to change compiling or linking flags > someway. > > Compiling flags for main module: > -Oz -fPIC -s DISABLE_EXCEPTION_CATCHING=0 -Wno-builtin-macro-redefined > -Wno-dollar-in-identifier-extension > > Compiling flags for side module: > -std=c++14 -fPIC > > Linking flags for main module: > > -O3 -s EVAL_CTORS=0 --closure 0 -s ALIASING_FUNCTION_POINTERS=0 -s > ELIMINATE_DUPLICATE_FUNCTIONS=1 -s ELIMINATE_DUPLICATE_FUNCTIONS_PASSES=12 > --llvm-lto 3 -s FORCE_FILESYSTEM=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s > 'EXTRA_EXPORTED_RUNTIME_METHODS=["getTempRet0","setTempRet0", "cwrap"]' -s > [email protected] <javascript:> > -s DISABLE_EXCEPTION_CATCHING=2 -s > [email protected] <javascript:> > > Linking flags for side module: > -s SIDE_MODULE=1 -s WASM=1 -Oz -s EVAL_CTORS=0 --closure 0 -s > ALIASING_FUNCTION_POINTERS=0 -s ELIMINATE_DUPLICATE_FUNCTIONS=1 -s > ELIMINATE_DUPLICATE_FUNCTIONS_PASSES=12 --llvm-lto 3 -s > ERROR_ON_UNDEFINED_SYMBOLS=0 > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/5f30a113-7203-4eba-9426-9f626c51ec26%40googlegroups.com > > <https://groups.google.com/d/msgid/emscripten-discuss/5f30a113-7203-4eba-9426-9f626c51ec26%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/e8a9f44f-a8f5-46f2-b440-e2356f285d28%40googlegroups.com.
