Issue with passing flags at compile time

25 views
Skip to first unread message

Rohit Saini

unread,
Feb 28, 2020, 6:11:27 AM2/28/20
to emscripten-discuss
Hi All,

Previously we were using 1.38.28 and now we upgraded to 1.39.7. Previously passing flags like DISABLE_EXCEPTION_CATCHING was working during linking time. Now with newer compiler as we have to pass flag during compile time as well, If I have to make two builds one with DISABLE_EXCEPTION_CATCHING = 0 and other with DISABLE_EXCEPTION_CATCHING = 1, do I need to compile my code twice with different configurations. Is there any other way to do this because compiling same code twice will increase my build time..

Regards,
Rohit Saini

Sam Clegg

unread,
Mar 2, 2020, 1:11:55 PM3/2/20
to emscripte...@googlegroups.com
On Fri, Feb 28, 2020 at 3:11 AM Rohit Saini <rohitsa...@gmail.com> wrote:
Hi All,

Previously we were using 1.38.28 and now we upgraded to 1.39.7. Previously passing flags like DISABLE_EXCEPTION_CATCHING was working during linking time. Now with newer compiler as we have to pass flag during compile time as well, If I have to make two builds one with DISABLE_EXCEPTION_CATCHING = 0 and other with DISABLE_EXCEPTION_CATCHING = 1, do I need to compile my code twice with different configurations. Is there any other way to do this because compiling same code twice will increase my build time..


I believe the answer is yes.  If you have a build with exceptions and one without, all the object files need to be recompiled because the generated code is different.

fastcomp avoided this by delaying all code generation until link time, so you were basically recompiling (at least from bitcode) your entire project every time you linked before.   This made re-linking very slow.   Overall I would expect to see fast builds with the new backend, mostly because linking is now fast and compilation can be done in parallel with something like `make -j`.

cheers,
sam
 
Regards,
Rohit Saini

--
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 emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/e9c40106-b71c-41e1-9650-3c0d4a788fad%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages