Keep in mind that inlining is one area area where it may matter. If you're 
aggressively shrinking your size, you'll want to disable inlining when you 
build the external library. I haven't checked, but it may be possible to 
delay the inlining decision until you compile and link your final output, 
but I'm not 100% on that.

On Thursday, August 13, 2015 at 11:35:52 AM UTC-7, Alon Zakai wrote:
>
> The docs are a little overly cautious. It is safe to build source files 
> with different LLVM optimizations, like some with -O3, some with -O0, -Os, 
> etc.
>
> In general you should build libraries the same as for any other platform. 
> In ports, I think most are -O2 (automatically, you don't need to do 
> anything for them).
>
> On Thu, Aug 13, 2015 at 3:39 AM, Peter Nemeth <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I'm wondering how do you manage precompiled libraries which you don't 
>> want to recompile every time, a la emscripten-ports.
>>
>> My issue is with the optimization levels, more accurately the difference 
>> in them. As stated in the docs:
>>
>> If you compile several files into a single JavaScript output, be sure to 
>>> specify the same optimization flags when compiling sources into objects, 
>>> and objects into JavaScript or HTML.
>>>
>>
>> Do you keep several versions with different optimization levels and 
>> always choose the appropriate one?
>>
>> How does it work with emscripten-ports? I don't remember it rebuilding 
>> the sources if I change optimization level after the initial build.
>>
>> Bests, Peter
>>
>> -- 
>> 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:>.
>> 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