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

dev-lang/rust: attempt to make the build system to honor MAKEOPTS #95

Merged
merged 4 commits into from
Feb 6, 2018
Merged

dev-lang/rust: attempt to make the build system to honor MAKEOPTS #95

merged 4 commits into from
Feb 6, 2018

Conversation

stefson
Copy link
Contributor

@stefson stefson commented Feb 2, 2018

by default, dev-lang/rust does use one job per thread, which can be a problem if there is not enough memory per job on the build system. It was fixed for src_compile recently in the main tree, however there are some subtle differences in the structure of the ebuilds and I'm not certain if this fix actually works as intended for the musl ebuild provided here.

I will test it, but it might take some time. If someone with more experience thinks the fix will be working, or tests this on his own, I'd be fine with it.

@stefson
Copy link
Contributor Author

stefson commented Feb 3, 2018

Note to myself - right in the beginning of src_compile there is something wrong

Compiling source in /var/tmp/portage/dev-lang/rust-1.23.0-r1/work/rustc-1.23.0-src ...
running: /var/tmp/portage/dev-lang/rust-1.23.0-r1/work/stage0/bin/cargo build --manifest-path /var/tmp/portage/dev-lang/rust-1.23.0-r1/work/rustc-1.23.0-src/src/bootstrap/Cargo.toml --verbose --verbose --locked --frozen

this command uses all available cores, likeley up to the point where it starts building its internal llvm copy, but this time with the correct value of MAKEOPTS

I can't see anything corresponding in the build, and neither find much informations with search engine when typing 'cargo limit number of jobs' for obvious reasons, but it should be possible to execute

../work/stage0/bin/cargo/build -j$(makeopts_jobs) --manifest-path ../$(PATH)

@stefson
Copy link
Contributor Author

stefson commented Feb 3, 2018

@lluixhi: I'm failing to fix the number of jobs during early bootstrap, before the internal llvm is build. You got any idea what is going on there? The ebuild itself executes ./x.py during src_compile, that's all. Is it a an upstream bug in the build system?

rust-early-bootstrap.zip
see the build log if it helps

@lluixhi
Copy link
Contributor

lluixhi commented Feb 6, 2018

Hmmmm I'm not really sure but I'll check it out -- in the meantime I'll merge these.

@lluixhi lluixhi merged commit 1808c61 into gentoo:master Feb 6, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants