-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
mrustc: init at 0.9 #113817
mrustc: init at 0.9 #113817
Conversation
Please squash all package related commits together. |
cp run_rustc/output/prefix/bin/cargo $out/bin/cargo | ||
cp run_rustc/output/prefix/bin/rustc_binary $out/bin/rustc | ||
|
||
cp -r run_rustc/output/prefix/lib/* $out/lib/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should move this to a separate output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's definitely something we can look into, but I think for now I would prefer to just keep the bootstrap installation as simple as possible. I expect the final user-facing rustc derivations will disallow references to these bootstrapping stages anyway, so it shouldn't make any difference in terms of closure size whether this uses split outputs.
@SuperSandro2000 Is this all right with you? As a reviewer I sometimes like to see separation of concerns in commits, but I can just squash if it's not actually helpful. |
I bet 10 bucks on that I will probably forget it.
If you don't rebase with master on force pushes I can see from the force push diff what you did. I am also using the mark-files-as-read-feature. Either works for me but keeping review comments around takes another force push before it can be merged. |
Haha, fair enough :) |
@ofborg build mrustc-minicargo |
I started updating the nix expression to work with the current mrustc master, which supports rust 1.39: progval@07b59ad But I still can't use it to build even build rust 1.29 ( |
Does the build use many CPU cores if they're available, or is it a memory-bound operation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise. I don't think we need to wait for the latest version to get an mrustc in Nixpkgs.
@grahamc It's partially parallel, but its bottleneck is by far the compilation of |
This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch). Result of 3 packages built:
|
mrustc is mostly patched to use shared LLVM sources but still uses in-tree source for compiler-rt from LLVM 7. This needs to be patched to compile under glibc 2.31 or later. It's easy enough to reapply all our compiler-rt patches here.
@alyssais Thanks for the suggestions, updated. |
@ofborg build mrustc-minicargo
|
Now let's get an up to date one!
Feel free to request a review from me in any followups.
|
@r-burns jsyk, in future when you take a commit like that, you can mark
yourself as a co-author on that commit using Co-authored-by, so that
GitHub and other tools will recognise your work on it.
https://docs.github.com/en/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors
|
Yay, it built! https://hydra.nixos.org/build/141770406#tabs-summary |
This is rebased from the excellent work done by @progval in #85542, with the hopes that we can merge the underlying mrustc expressions and iterate on them while we sort out the bootstrapping logic.
Functional changes:
Cleanups:
The mrustc-bootstrap builds rustc and cargo using mrustc. This is the main
motivator for mrustc and is very finicky so it's important that we
build this regularly and keep it green.
@progval says:
Can I tell hydra that this build will need a lot of RAM?
Compilation might take several hours on less beefy machines;
I hope Hydra doesn't timeout on this.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)