Skip to content
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

Expose function compile to an object file #912

Closed
roblabla opened this issue Dec 15, 2023 · 2 comments · Fixed by #914
Closed

Expose function compile to an object file #912

roblabla opened this issue Dec 15, 2023 · 2 comments · Fixed by #914

Comments

@roblabla
Copy link
Contributor

Currently, rustc's bootstrap uses cc to generate object file by asking it to generate a .a archive, discard the archive, and "guessing" where the temporary object files are to use them. Things like this. This, however, has been broken since either #684 or #786, as bootstrap does not understand the hashing mechanism used by cc-rs. This prevents upgrading cc in rustc's bootstrap, which is not ideal as cc has since included some bugfixes that are necessary to properly handle some situations (such as this).

I wonder if cc would accept a PR adding a public Build::compile_objects() function that would return a Vec<Path> of all the object files?

@NobodyXu
Copy link
Collaborator

I think you'd want a different name.

@thomcc
Copy link
Member

thomcc commented Jan 2, 2024

I wonder if cc would accept a PR adding a public Build::compile_objects() function that would return a Vec of all the object files?

Yes, we would. I don't have strong feelings about the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants