-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: setup bootstrap and ci #3
Conversation
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 left some minor nits. I also have a question for this backend: is there a reason why you need to reinvent a bootstrap instead of forking the rust
repo then adding additional logic as necessary?
EDIT: to clarify, it's entirely possible that you have very good reasons or run into difficult limitations for doing so. I'm asking because using Yet Another Bootstrap makes (1) upstreaming the backend very very difficult and (2) makes it more difficult for other rustc contributors who wants to make changes to this backend because they have to deal with the intricacies of Yet Another Build System.
bootstrap/.gitignore
Outdated
@@ -0,0 +1 @@ | |||
/target |
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: can you make sure the files have trailing newlines because I think some Unix tools assume trailing newlines exist?
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.
Fixed.
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.
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.
@jieyouxu did you mean to mark this as resolved? Looks like they are still there
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.
Oh, or maybe you had it resolved before and I just commented without unresolving :)
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.
Oh maybe I thought they were fixed, not sure
In projects such as rustc_codegen_cranelift or rust_codegen_gcc, there exists a component referred to as the |
Refer to #2 (comment) |
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 this looks pretty good overall. Please just make sure absolute paths are used everywhere, otherwise it looks like a lot of things will break when running from a different directory.
Aside from that, a few other comments but I don't see any big issues.
bootstrap/.gitignore
Outdated
@@ -0,0 +1 @@ | |||
/target |
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.
} | ||
} | ||
|
||
pub fn perform(&self, command: &mut Command) { |
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: perform
and run
should probably get different names since it isn't very obvious what the difference is. Or ideally, just put this into a trait so all steps are required to use the same interface.
Nonblocker though, this can be changed later.
The use cases for bootstrap are typically highly specific to the project structure, making execution in alternative directories impractical. Additionally, the brevity of the As far as I am aware, |
@tgross35 Please check the latest changes. |
Forgot this relaunches with the given directory, makes sense then.
There are a couple unresolved comments still. Specifically #3 (comment) so tools don't break (I guess that one was labeled resolved even though that might not have been accurate), and #3 (comment) to make one CLI option more consistent. Other than that LGTM. This could be squashed, or I can just do it on merge. |
A squash merge seems like a good idea. |
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.
Awesome, let's get this off the ground. Thanks!
This pull request sets up the bootstrap process and CI for the C codegen backend.