-
Notifications
You must be signed in to change notification settings - Fork 442
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
Add new compile_intermediates function. #914
Conversation
Thanks. I won't be able to take a look at this until the weekend. |
1b35617
to
51af4a6
Compare
469c86d
to
9675445
Compare
9675445
to
1316b84
Compare
pinging @roblabla just in case you forgot this PR/comment |
This new function can be used to just compile the files to a bunch of .o files.
Since rust-lang#684 was merged, it is impossible for `obj` to not start with dst - if `obj` is absolute or contains `../` in its Path, then the path will be hashed, and the file will still be placed under dst. As such, this obj.starts_with(&dst) check is always true.
cbe0137
to
463febc
Compare
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.
Thank you!
Could you please run cargo-fmt before committing?
ba180b4
to
4d11c28
Compare
4d11c28
to
d493b90
Compare
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.
Thank you!
This new function can be used to just compile the files to a bunch of .o files. It won't create an archive file, nor print any of the cargo link directives. This is meant to be used by rustc to:
crtbegin.c
hereCurrently, rustc guesses the output path of the object files, even though it's an unexposed implementation detail of
cc
. The latest version ofcc
added some hash to the generated object file name, which broke rustc's assumptions.By providing a proper way to generate an object file using
cc
, this should hopefully make the system more robust.Fixes #912