-
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
Sync rustc_codegen_cranelift #86927
Merged
Merged
Sync rustc_codegen_cranelift #86927
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change adds the bpfel-unknown-none and bpfeb-unknown-none targets which can be used to generate little endian and big endian BPF
Both cg_llvm and cg_clif don't override it. cg_spirv does override it, so it needs to be preserved.
…k(kind = "raw-dylib")]. This does not yet support #[link_name] attributes on functions, the #[link_ordinal] attribute, #[link(kind = "raw-dylib")] on extern blocks in bin crates, or stdcall functions on 32-bit x86.
BPF target support This adds `bpfel-unknown-none` and `bpfeb-unknown-none`, two new no_std targets that generate little and big endian BPF. The approach taken is very similar to the cuda target, where `TargetOptions::obj_is_bitcode` is enabled and code generation is done by the linker. I added the targets to `dist-various-2`. There are [some tests](https://github.com/alessandrod/bpf-linker/tree/main/tests/assembly) in bpf-linker and I'm planning to add more. Those are currently not ran as part of rust CI.
…enkov Partial support for raw-dylib linkage First cut of functionality for issue rust-lang#58713: add support for `#[link(kind = "raw-dylib")]` on `extern` blocks in lib crates compiled to .rlib files. Does not yet support `#[link_name]` attributes on functions, or the `#[link_ordinal]` attribute, or `#[link(kind = "raw-dylib")]` on `extern` blocks in bin crates; I intend to publish subsequent PRs to fill those gaps. It's also not yet clear whether this works for functions in `extern "stdcall"` blocks; I also intend to investigate that shortly and make any necessary changes as a follow-on PR. This implementation calls out to an LLVM function to construct the actual `.idata` sections as temporary `.lib` files on disk and then links those into the generated .rlib.
Driver improvements This PR contains a couple of cleanups for the driver and a few small improvements for the custom codegen backend interface. It also implements `--version` and `-Cpasses=list` support for custom codegen backends.
…ochenkov Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}. The two methods were exactly the same so this removes the cranelift copy. This will help make sure both they don't get out of sync.
Drop metadata_encoding_version. Part of rust-lang#85153 r? `@Aaron1011`
…ternal representation.
This has a fix for a miscompilation on AArch64 cc rust-lang#1184
The information is stored in used_crate_source too anyway
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
Jul 7, 2021
This comment has been minimized.
This comment has been minimized.
Object started depending on it
@bors r+ |
📌 Commit 00b2f56 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Jul 7, 2021
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jul 7, 2021
…jorn3 Sync rustc_codegen_cranelift The main hightlight this sync is basic support for AArch64. Most things should work on Linux, but there does seem to be an ABI incompatibility causing proc-macros to crash, see https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184. Thanks to `@afonso360` for implementing all Cranelift features that were necessary to compile for AArch64 using cg_clif. Also thanks to `@shamatar` for implementing the `llvm.x86.addcarry.64` and `llvm.x86.subborrow.64` llvm intrinsics used by num-bigint (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1178) and `@eggyal` for implementing multi-threading support for the lazy jit mode. (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1166) r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Jul 7, 2021
…jorn3 Sync rustc_codegen_cranelift The main hightlight this sync is basic support for AArch64. Most things should work on Linux, but there does seem to be an ABI incompatibility causing proc-macros to crash, see https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184. Thanks to ``@afonso360`` for implementing all Cranelift features that were necessary to compile for AArch64 using cg_clif. Also thanks to ``@shamatar`` for implementing the `llvm.x86.addcarry.64` and `llvm.x86.subborrow.64` llvm intrinsics used by num-bigint (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1178) and ``@eggyal`` for implementing multi-threading support for the lazy jit mode. (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1166) r? ``@ghost`` ``@rustbot`` label +A-codegen +A-cranelift +T-compiler
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jul 8, 2021
Rollup of 9 pull requests Successful merges: - rust-lang#86639 (Support lint tool names in rustc command line options) - rust-lang#86812 (Recover from `&dyn mut ...` parse errors) - rust-lang#86917 (Add doc comment for `impl From<LayoutError> for TryReserveError`) - rust-lang#86925 (Add self to mailmap) - rust-lang#86927 (Sync rustc_codegen_cranelift) - rust-lang#86932 (Fix ICE when misplaced visibility cannot be properly parsed) - rust-lang#86933 (Clean up rustdoc static files) - rust-lang#86955 (Fix typo in `ops::Drop` docs) - rust-lang#86956 (Revert "Add "every" as a doc alias for "all".") Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main hightlight this sync is basic support for AArch64. Most things should work on Linux, but there does seem to be an ABI incompatibility causing proc-macros to crash, see https://github.com/bjorn3/rustc_codegen_cranelift/issues/1184. Thanks to @afonso360 for implementing all Cranelift features that were necessary to compile for AArch64 using cg_clif. Also thanks to @shamatar for implementing the
llvm.x86.addcarry.64
andllvm.x86.subborrow.64
llvm intrinsics used by num-bigint (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1178) and @eggyal for implementing multi-threading support for the lazy jit mode. (https://github.com/bjorn3/rustc_codegen_cranelift/pull/1166)r? @ghost
@rustbot label +A-codegen +A-cranelift +T-compiler