attila-lendvai / maru

Maru - a tiny self-hosting lisp dialect
http://piumarta.com/software/maru/
Other
189 stars 10 forks source link

make -j unsafe #5

Open barak opened 1 year ago

barak commented 1 year ago

The Makefile is not parallel-build safe when using the default target. In other words, make -j8 results in multiple processes stepping on each others' toes.

attila-lendvai commented 1 year ago

the situation is that make -j works, and is a nice speedup when building the current version, but the chain of the bootstrapping process is not thread safe (i.e. the first invocation of the build after a make distclean).

besides making the bootstrap threadsafe, we could disable parallelism alltogether, but then building during normal development would be slower.

barak commented 1 year ago

Sure. Making the bootstrap safe is the "right" solution, but also the trickiest, of course. For now, maybe have the bootstrap do a $(MAKE) -j1 actual-bootstrap-target, to keep it safe? Or put it in another Makefile with .NOPARALLEL: ?

attila-lendvai commented 1 year ago

i tried to play with it but i can't even build it on guix at the moment... :/

see the latest commit for commentary, and/or the llvm crash: https://github.com/llvm/llvm-project/issues/60952