I think this applies mostly to the 'traditional' clang compiler options 
(stuff like -O3).

The -s options (like FULL_ES2, TOTAL_MEMORY, ...) are usually only for the 
linker stage, but there were one or two -s options which also applied to 
the compile stage, I just can't remember what those special settings were 
(in my own build files, all the -s settings go to the linker stage only).

Only clang is involved when compiling the source files into LLVM bitcode, 
emscripten's magic happens during the linker stage after the bitcode is 
linked and optimized, and nearly all of the -s settings control 
emscripten's behaviour so they're only necessary for the linker stage.

Cheers,
-Floh.

Am Dienstag, 25. Oktober 2016 10:56:24 UTC+2 schrieb caiiiycuk:
>
> Hi! As said in section "Building projects":
> >> In order to properly optimize code, it is important to use the same 
> optimization flags and other compiler options when compiling source to 
> object code, and object code to JavaScript (or HTML).
>
> Is it really true? I think that many flags are work only on link time 
> (ASSERTIONS, FULL_ES2, TOTAL_MEMORY, INVOKE_RUN, NO_EXIT_RUNTIME, 
> DISABLE_EXCEPTION_CATCHING, etc.) or I wrong? I try to optimize my project 
> by perfomance and rebuilding all sources after one takes very long time. Is 
> there are any way to understand that some flag work only on link time?
>

-- 
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