-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/apply patch #46
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
base: main
Are you sure you want to change the base?
Feat/apply patch #46
Conversation
| ]) | ||
| .stdoe(cu::lv::W) | ||
| .stdin(cu::pio::write(PATCH_FILE)) | ||
| .spawn()? |
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.
I think you can just do .wait_nz()? instead of .spawn()?.wait()?. _nz means wait for non-zero exit status (will error if command fails)
| cu::bail!("failed to checkout the blessed commit."); | ||
| } | ||
|
|
||
| match patch_rust_std(&rust_path) { |
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.
cu::check!(patch_rust_std(&rust_path), "failed to apply rust std patches")?;| Install { | ||
| /// Keep the rustc/llvm build output. This may consume a lot of disk space, | ||
| /// but makes it faster when debugging the toolchain | ||
| /// |
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.
nit: remove extra line
| /// The "blessed" commit hash to use (i.e. tested and will work) | ||
| static RUST_COMMIT: &str = "caadc8df3519f1c92ef59ea816eb628345d9f52a"; | ||
| // This is a patch for the rust stdlib | ||
| // static PATCH_FILE: &'static str = "../../../../patches/rust_std.patch"; |
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.
nit: remove the commented out lint
| // Copyright (c) 2025 Megaton contributors | ||
|
|
||
| use std::path::{Path, PathBuf}; | ||
| use std::{io::stdout, path::{Path, PathBuf}}; |
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.
unused?
| // Copyright (c) 2025 Megaton contributors | ||
|
|
||
| // // This modules handles compiling c/c++/asm/rust code | ||
| // This modules handles compiling c/c++/asm/rust code |
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.
nit: don't have to fix right now, but module comments start with //!
Patch our rust stdlib to initialize the environment