Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make -j unsafe #5

Open
barak opened this issue Feb 16, 2023 · 3 comments
Open

make -j unsafe #5

barak opened this issue Feb 16, 2023 · 3 comments

Comments

@barak
Copy link

barak commented Feb 16, 2023

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
Copy link
Owner

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
Copy link
Author

barak commented Feb 22, 2023

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
Copy link
Owner

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: llvm/llvm-project#60952

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants