-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Improve generating Custom entry function #104001
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @wesleywiser (or someone else) soon. Please see the contribution instructions for more information. |
These commits modify compiler targets. |
And now there will be 3 copy&pasted matches instead of one? Maybe there is a other way. |
cb5210b
to
176b7bc
Compare
Can you elaborate on what you mean by "copy&pasted matches"? |
That big match from |
This commit is aimed at making compiler generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of rust-lang#100316. Currently, this moves the entry function name and Call convention to the target spec. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
176b7bc
to
9f0a862
Compare
Thanks @Ayush1325, this looks good to me! @bors r+ |
This is a continuation of 9f0a862 for gcc. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo |
Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 |
@bjorn3 I have tried doing the same stuff for cranelift. However, I'm not sure how to map the call convention with |
You could extract the match at
|
This is a continuation of 9f0a862 for cranelift. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
91992cc
to
2436dff
Compare
@bors r+ |
🌲 The tree is currently closed for pull requests below priority 1. This pull request will be tested once the tree is reopened. |
I think it is fine. |
Improve generating Custom entry function This commit is aimed at making compiler-generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of rust-lang#100316. Currently, this moves the entry function name and Call convention to the target spec. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Rollup of 8 pull requests Successful merges: - rust-lang#104001 (Improve generating Custom entry function) - rust-lang#104411 (nll: correctly deal with bivariance) - rust-lang#104528 (Properly link `{Once,Lazy}{Cell,Lock}` in docs) - rust-lang#104553 (Improve accuracy of asinh and acosh) - rust-lang#104554 (Use `ErrorGuaranteed::unchecked_claim_error_was_emitted` less) - rust-lang#104566 (couple of clippy::perf fixes) - rust-lang#104575 (deduplicate tests) - rust-lang#104580 (diagnostics: only show one suggestion for method -> assoc fn) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Improve generating Custom entry function This commit is aimed at making compiler-generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of rust-lang#100316. Currently, this moves the entry function name and Call convention to the target spec. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Improve generating Custom entry function This commit is aimed at making compiler-generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of rust-lang#100316. Currently, this moves the entry function name and Call convention to the target spec. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
This commit is aimed at making compiler-generated entry functions (Basically just C
main
right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of #100316.Currently, this moves the entry function name and Call convention to the target spec.
Signed-off-by: Ayush Singh ayushsingh1325@gmail.com