Thinking about this some more, this does seem very useful. I added it as an
option on incoming now: building with -s MAIN_MODULE=2 (instead of 1)
creates a main module that has normal dead code elimination turned on.
EXPORTED_FUNCTIONS can of course be used to keep things alive that the
child needs. There is a test (other.test_minimal_dynamic) showing this in
action.

On Tue, Aug 18, 2015 at 5:30 PM, Alon Zakai <[email protected]> wrote:

> I suspect that is SDL JS code from src/library_sdl.js, and not compiled
> SDL2 code? We do include all the JS libraries by default when dynamic
> linking is present. In the proposed option to allow dead code elimination
> in the main file, we could also disable that when the option is enabled.
> (And, if a library needs something from a JS system library, it would be
> the user's responsibility to make sure it was linked in.)
>
> On Tue, Aug 18, 2015 at 4:42 PM, Paul Austin <[email protected]> wrote:
>
>> Looking at  it some more, there is a simpler question, I can see a good
>> chunk of the js file it is SDL, code that that is not there if MAIN_MOULE=1
>> is omitted
>>
>> The following environment variables are set.
>>
>> EMCC_FORCE_STDLIBS=libc
>> EMCC_ONLY_FORCED_STDLIBS=1
>>
>> Should SDL still be there? I suspect I'm just missing a setting.
>>
>> --
>> 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].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to