-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add compiler-builtins
to bootstrap
#142106
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: master
Are you sure you want to change the base?
Conversation
Bootstrap people, I think I need some help here making this actually work :) ideally these tests should probably run via path ( It would be good for this to run on CI, as well. |
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.
Left a few comments. I noticed that compiler-builtins
has its own workspace, but at the same time, it doesn't have a Cargo.lock
file. I wonder how do we want to deal with that, the dependencies probably should be locked. Either we should add a lockfile to it, or we should somehow make it a part of the root workspace? 🤔
const DEFAULT: bool = true; | ||
|
||
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { | ||
run.paths(&["library/compiler-builtins", "library/compiler-builtins/compiler-builtins"]) |
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.
run.paths(&["library/compiler-builtins", "library/compiler-builtins/compiler-builtins"]) | |
run.path("library/compiler-builtins") |
Should be enough, I think.
|
||
impl Step for CompilerBuiltins { | ||
type Output = (); | ||
const DEFAULT: bool = true; |
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.
This actually makes it run on CI :)
pub struct CompilerBuiltins { | ||
compiler: Compiler, | ||
target: TargetSelection, | ||
mode: Mode, |
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.
The builtins only make sense for Mode::Std
, I think? So we don't need to parametrize this and the step can just hardcode it.
// Most tests are in the builtins-test crate. | ||
let crates = ["compiler-builtins".to_string(), "builtins-test".to_string()]; | ||
let cargo = make_cargo(|c| c); | ||
run_cargo_test(cargo, &[], &crates, "compiler-buitlins", target, builder); |
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.
run_cargo_test(cargo, &[], &crates, "compiler-buitlins", target, builder); | |
run_cargo_test(cargo, &[], &crates, "compiler-builtins", target, builder); |
:) Also below.
let crates = ["compiler-builtins".to_string(), "builtins-test".to_string()]; | ||
let cargo = make_cargo(|c| c); | ||
run_cargo_test(cargo, &[], &crates, "compiler-buitlins", target, builder); | ||
let cargo = make_cargo(|c| c.arg("--release")); |
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.
Why do we need another variation for --release
? Cargo automatically sets --release
based on rust.optimize
config value.
target, | ||
Kind::Test, | ||
); | ||
f(&mut c); |
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.
f(&mut c); | |
c.current_dir(&builder.src.join("library").join("compiler-builtins")); | |
f(&mut c); |
}; | ||
|
||
// Most tests are in the builtins-test crate. | ||
let crates = ["compiler-builtins".to_string(), "builtins-test".to_string()]; |
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.
let crates = ["compiler-builtins".to_string(), "builtins-test".to_string()]; | |
let crates = ["compiler_builtins".to_string(), "builtins-test".to_string()]; |
No description provided.