-
Notifications
You must be signed in to change notification settings - Fork 214
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
Memory use during build #404
Comments
You can pass |
I am talking about this part of the build script that launches multiple cargo instances in parallel
passing |
As far as I understand the jobserver should be passed through to those cargo sub invocations using |
I am not familiar with cargo internals, but I have observed at least three concurrent |
I think I get it. I think all four cargo invocations assumed they had an implicit token from getting spawned as they normally would and thus they all thought it would be fine to spawn one rustc instance. One fix for that would be to use the jobserver crate inside the build script to limit spawning new cargo invocations based on if a jobserver token is available. |
Thanks for reporting this issue!
I'm not familiar with the make jobserver, but this sounds like a good approach. Alternatively, we could also read the As a side note, I plan to replace these nested |
I was trying to build bootloader on my notebook with 4GB ram. Unfortunately, it runs out of memory and becomes unbearably slow with swapping. I think this is due to the parallel build of boot stages. It would be neat to have an option to build them sequentially.
The text was updated successfully, but these errors were encountered: