-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Move rustllvm into compiler/rustc_llvm
#74787
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
Conversation
|
r? @lcnr (rust_highfive has picked a reviewer for you, use r? to override) |
|
🤷 There aren't any obvious problems here but it's not up to me to decide if this change should be made. r? @cuviper |
This all sounds good to me.
I think we could even move all of the FFI declarations to
I'm personally not too worried about that, as this seems like a simple enough move that git's tracking should work, but it's ok if you want to wait and do it with the compiler move or soon after. We should also remember to update the config in highfive. |
|
Blocked on #74862. |
|
☔ The latest upstream changes (presumably #74733) made this pull request unmergeable. Please resolve the merge conflicts. |
Shall we perhaps just rename it to |
|
Yes, I agree the naming between |
|
Also, this is no longer blocked, I think. @rustbot modify labels: +S-waiting-on-author -S-blocked |
bc6c1d5 to
41970e6
Compare
rustllvm into librustc_llvmrustllvm into compiler/rustc_llvm
|
Rebased. It's not renamed to
|
It could be renamed from |
|
☔ The latest upstream changes (presumably #75655) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Need to pick up the #75655 change, then r=me.
41970e6 to
10d3f8a
Compare
|
@bors r=cuviper |
|
📌 Commit 10d3f8a has been approved by |
|
⌛ Testing commit 10d3f8a with merge 6744b6415ee1b69b4a5ea618632557446fba6004... |
Move `rustllvm` into `compiler/rustc_llvm` The `rustllvm` directory is not self-contained, it contains C++ code built by a build script of the `rustc_llvm` crate which is then linked into that crate. So it makes sense to make `rustllvm` a part of `rustc_llvm` and move it into its directory. I replaced `rustllvm` with more obvious `llvm-wrapper` as the subdirectory name, but something like `llvm-adapter` would work as well, other suggestions are welcome. To make things more confusing, the Rust side of FFI functions defined in `rustllvm` can be found in `rustc_codegen_llvm` rather than in `rustc_llvm`. Perhaps they need to be moved as well, but this PR doesn't do that. The presence of multiple LLVM-related directories in `src` (`llvm-project`, `rustllvm`, `librustc_llvm`, `librustc_codegen_llvm` and their predecessors) historically confused me and made me wonder about their purpose. With this PR we will have LLVM itself (`llvm-project`), a FFI crate (`rustc_llvm`, kind of `llvm-sys`) and a codegen backend crate using LLVM through the FFI crate (`rustc_codegen_llvm`).
|
Rolled up |
|
⌛ Testing commit 10d3f8a with merge 92a4fcb95c9c085e579bfeb938a1d490b115483d... |
|
Rolled up again |
Rollup of 7 pull requests Successful merges: - rust-lang#74787 (Move `rustllvm` into `compiler/rustc_llvm`) - rust-lang#76458 (Add drain_filter method to HashMap and HashSet) - rust-lang#76472 (rustbuild: don't set PYTHON_EXECUTABLE and WITH_POLLY cmake vars since they are no longer supported by llvm) - rust-lang#76497 (Use intra-doc links in `core::ptr`) - rust-lang#76500 (Add -Zgraphviz_dark_mode and monospace font fix) - rust-lang#76543 (Document btree's unwrap_unchecked) - rust-lang#76556 (Revert rust-lang#76285) Failed merges: r? `@ghost`
`src/rustllvm` moved to `compiler/rustc_llvm` in rust-lang/rust#74787
`src/rustllvm` and `src/librustc_llvm` moved to `compiler/rustc_llvm` in rust-lang/rust#74787.
`src/rustllvm` and `src/librustc_llvm` moved to `compiler/rustc_llvm` in rust-lang/rust#74787.
The
rustllvmdirectory is not self-contained, it contains C++ code built by a build script of therustc_llvmcrate which is then linked into that crate.So it makes sense to make
rustllvma part ofrustc_llvmand move it into its directory.I replaced
rustllvmwith more obviousllvm-wrapperas the subdirectory name, but something likellvm-adapterwould work as well, other suggestions are welcome.To make things more confusing, the Rust side of FFI functions defined in
rustllvmcan be found inrustc_codegen_llvmrather than inrustc_llvm. Perhaps they need to be moved as well, but this PR doesn't do that.The presence of multiple LLVM-related directories in
src(llvm-project,rustllvm,librustc_llvm,librustc_codegen_llvmand their predecessors) historically confused me and made me wonder about their purpose.With this PR we will have LLVM itself (
llvm-project), a FFI crate (rustc_llvm, kind ofllvm-sys) and a codegen backend crate using LLVM through the FFI crate (rustc_codegen_llvm).