Emscripten and distcc?

74 views
Skip to first unread message

Soeren Balko

unread,
May 14, 2017, 10:50:49 PM5/14/17
to emscripten-discuss
We use emscripten a lot with different build configurations (wasm, asmjs, pthreads, etc.) to compile a large stack. Even on a 4C/8T Core i7, this takes 5 minutes. Hence our interest to use distcc.

It seems as if distcc primarily targets gcc-based toolchains. That being said, I wonder if it can be tweaked to run emscripten's emcc (and the underlying "fastcomp" LLVM binaries)? The setup we have so far put together is this:

* One master PC holding the Git checkout of our project
* One slave PC, directly connected to master via Ethernet
* Custom checkout of emscripten, fastcomp, fastcomp-clang with some patches (ie., not using the emscripten SDK)
* emscripten, fastcomp, fastcomp-clang made available to slave PC via NFS mount (effectively same folder as on master)

Can we make distcc work with emscripten, based on that setup? Does it need to be altered?

Any suggestions are welcome - thanks!
Soeren

Charles Vaughn

unread,
May 16, 2017, 8:33:42 PM5/16/17
to emscripten-discuss
I think it's been brought up before. Your biggest timesink is going to be the final Javascript generation since that's not actually an LLVM process. Even the Javascript LLVM backend isn't amenable to distcc type stuff since it's monolithic. In theory side modules would let you have a faster development process, but you'd end up with one really big MAIN_MODULE generation time.

Soeren Balko

unread,
May 16, 2017, 10:55:39 PM5/16/17
to emscripte...@googlegroups.com

Not for my project: the final JS generation is small in comparison to compiling a couple of .bc files (each corresponding to a separate shared library).

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/IgGoqvflCnc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Soeren Balko Director and CTO clipchamp.com soe...@clipchamp.com Add videos to your emails with the FREE Clipchamp plugin for Gmail!

Alon Zakai

unread,
May 17, 2017, 1:24:55 AM5/17/17
to emscripten-discuss
In that case distcc should work, since builds are deterministic across machines, same C++ inputs + same flags should lead to same outputs. I haven't tried it myself though.

On Tue, May 16, 2017 at 7:55 PM, Soeren Balko <soe...@clipchamp.com> wrote:

Not for my project: the final JS generation is small in comparison to compiling a couple of .bc files (each corresponding to a separate shared library).


On 17/05/17 10:33, Charles Vaughn wrote:
I think it's been brought up before. Your biggest timesink is going to be the final Javascript generation since that's not actually an LLVM process. Even the Javascript LLVM backend isn't amenable to distcc type stuff since it's monolithic. In theory side modules would let you have a faster development process, but you'd end up with one really big MAIN_MODULE generation time.

On Sunday, May 14, 2017 at 7:50:49 PM UTC-7, Soeren Balko wrote:
We use emscripten a lot with different build configurations (wasm, asmjs, pthreads, etc.) to compile a large stack. Even on a 4C/8T Core i7, this takes 5 minutes. Hence our interest to use distcc.

It seems as if distcc primarily targets gcc-based toolchains. That being said, I wonder if it can be tweaked to run emscripten's emcc (and the underlying "fastcomp" LLVM binaries)? The setup we have so far put together is this:

* One master PC holding the Git checkout of our project
* One slave PC, directly connected to master via Ethernet
* Custom checkout of emscripten, fastcomp, fastcomp-clang with some patches (ie., not using the emscripten SDK)
* emscripten, fastcomp, fastcomp-clang made available to slave PC via NFS mount (effectively same folder as on master)

Can we make distcc work with emscripten, based on that setup? Does it need to be altered?

Any suggestions are welcome - thanks!
Soeren
--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/IgGoqvflCnc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
Soeren Balko Director and CTO clipchamp.com soe...@clipchamp.com Add videos to your emails with the FREE Clipchamp plugin for Gmail!

--
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-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages