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

Sync rustc_codegen_cranelift #83637

Merged
merged 60 commits into from
Mar 29, 2021
Merged

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Mar 29, 2021

The main highlight of this sync is support for cross-compiling to Windows using MinGW. Native compilation with MinGW would also work I think, but using the MSVC toolchain is not yet supported as PE TLS is not yet implemented. Another nice improvement is that crate metadata is now loaded using mmap instead of by reading files. This improves compilation time a bit.

r? @ghost

@rustbot label +A-codegen +A-cranelift +T-compiler

oli-obk and others added 30 commits March 5, 2021 09:33
This adds support for the WindowsFastcall calling convention
Support cross-compiling to Windows using MinGW
This reverts commit d194c70.

It fails the bootstrap test as jemalloc_sys is not built
Test the effect of shrinking the size of Rvalue by 16 bytes

r? `@ghost`
This replaces where it was previously being constructed in intrinsics, with direct construction
of the Statement.
Also add some span_bugs where it is unreachable
@rustbot rustbot added A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 29, 2021
@bjorn3
Copy link
Member Author

bjorn3 commented Mar 29, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Mar 29, 2021

📌 Commit 5444b46 has been approved by bjorn3

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 29, 2021
@bors
Copy link
Contributor

bors commented Mar 29, 2021

⌛ Testing commit 5444b46 with merge 3aedcf0...

@bors
Copy link
Contributor

bors commented Mar 29, 2021

☀️ Test successful - checks-actions
Approved by: bjorn3
Pushing 3aedcf0 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 29, 2021
@bors bors merged commit 3aedcf0 into rust-lang:master Mar 29, 2021
@rustbot rustbot added this to the 1.53.0 milestone Mar 29, 2021
@bjorn3 bjorn3 deleted the sync_cg_clif-2021-03-29 branch March 29, 2021 14:33
bors added a commit to rust-lang-ci/rust that referenced this pull request May 14, 2021
Use the object crate for metadata reading

This allows sharing the metadata reader between cg_llvm, cg_clif and other codegen backends.

This is not currently useful for rlib reading with cg_spirv ([rust-gpu](https://github.com/EmbarkStudios/rust-gpu/)) as it uses tar rather than ar as .rlib format, but it is useful for dylib reading required for loading proc macros. (cc `@eddyb)`

The object crate is already trusted as dependency of libstd through backtrace. As far as I know it supports reading all object file formats used by targets for which we support rust dylibs with crate metadata, but I am not certain. If this happens to not be the case, I could keep using LLVM for reading dylib metadata.

Marked as WIP for a perf run and as it is based on rust-lang#83637.
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request May 27, 2021
Use the object crate for metadata reading

This allows sharing the metadata reader between cg_llvm, cg_clif and other codegen backends.

This is not currently useful for rlib reading with cg_spirv ([rust-gpu](https://github.com/EmbarkStudios/rust-gpu/)) as it uses tar rather than ar as .rlib format, but it is useful for dylib reading required for loading proc macros. (cc `@eddyb)`

The object crate is already trusted as dependency of libstd through backtrace. As far as I know it supports reading all object file formats used by targets for which we support rust dylibs with crate metadata, but I am not certain. If this happens to not be the case, I could keep using LLVM for reading dylib metadata.

Marked as WIP for a perf run and as it is based on rust-lang#83637.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-cranelift Things relevant to the [future] cranelift backend merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants