-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 RUSTC_EMIT option to pass on --emit to crates during bootstrap #108365
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
I have a few remarks:
Note for future/follow-up/now:
|
The I could add the ability to specify the output formats with a syntax like |
Can you test building a stage 2 compiler and using it?
Yes please!
This would be great! |
The related documentation place for this context points to |
I've renamed the environmental variable to The dev guide seems to be the right place to add documentation as |
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.
Post a PR to the rustc dev guide, and apply my comments if you want.
"llvm-bc" => "bc", | ||
"asm" => { | ||
if target.map_or(false, |target| target.starts_with("x86")) { | ||
cmd.arg("-Cllvm-args=-x86-asm-syntax=intel"); |
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.
As a follow-up, make this configurable to be able to output ATT syntax.
I've opened a PR to add documentation. |
It would also be great if you add an entry to the changelog for bootstrap (located in |
Done. |
☔ The latest upstream changes (presumably #109164) made this pull request unmergeable. Please resolve the merge conflicts. |
Why not use |
|
It seems like rustc does not respect the output dir everytime. For example, LLVM IR and ASM do still output in the "normal" target directory, for example to |
☔ The latest upstream changes (presumably #111402) made this pull request unmergeable. Please resolve the merge conflicts. |
That may be a result of the hacks we use to force compiler-builtins to build with multiple codegen units. |
In the meantime, you could use |
triage: FYI: when a PR is ready for review, send a message containing |
I think I'll close this for now. It doesn't interact well with multiple CGUs and LTO. It might be better to base it on |
This makes it a bit more convenient to inspect the generated code of
rustc
crates. I also have an upstream patch to add demangling support tollvm-reduce
which pairs well with this to make the LLVM IR output more readable.