Skip to content

Commit d0df081

Browse files
Update links to librustc_llvm and rustllvm
1 parent 697dba3 commit d0df081

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/backend/updating-llvm.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ through each in detail.
9898
* `./x.py build src/tools/lld` - same for LLD
9999
* `./x.py build` - build the rest of rustc
100100

101-
You'll likely need to update `src/rustllvm/*.cpp` to compile with updated
102-
LLVM bindings. Note that you should use `#ifdef` and such to ensure that the
103-
bindings still compile on older LLVM versions.
101+
You'll likely need to update [`llvm-wrapper/*.cpp`][`llvm-wrapper`] to compile
102+
with updated LLVM bindings. Note that you should use `#ifdef` and such to ensure
103+
that the bindings still compile on older LLVM versions.
104104

105105
Note that `profile = "compiler"` and other defaults set by `x.py setup`
106106
download LLVM from CI instead of building it from source. You should
@@ -133,18 +133,20 @@ through each in detail.
133133
5. Prepare a PR to `rust-lang/rust`. Work with maintainers of
134134
`rust-lang/llvm-project` to get your commit in a branch of that repository,
135135
and then you can send a PR to `rust-lang/rust`. You'll change at least
136-
`src/llvm-project` and will likely also change `src/rustllvm/*` as well.
136+
`src/llvm-project` and will likely also change [`llvm-wrapper`] as well.
137137

138138
For prior art, previous LLVM updates look like
139139
[#55835](https://github.com/rust-lang/rust/pull/55835)
140140
[#47828](https://github.com/rust-lang/rust/pull/47828)
141141
[#62474](https://github.com/rust-lang/rust/pull/62474)
142142
[#62592](https://github.com/rust-lang/rust/pull/62592). Note that sometimes it's
143-
easiest to land `src/rustllvm/*` compatibility as a PR before actually updating
143+
easiest to land [`llvm-wrapper`] compatibility as a PR before actually updating
144144
`src/llvm-project`. This way while you're working through LLVM issues others
145145
interested in trying out the new LLVM can benefit from work you've done to
146146
update the C++ bindings.
147147

148+
[`llvm-wrapper`][https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm/llvm-wrapper]
149+
148150
### Caveats and gotchas
149151

150152
Ideally the above instructions are pretty smooth, but here's some caveats to

src/compiler-src.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,15 @@ You can see the exact dependencies by reading the `Cargo.toml` for the various
8787
crates, just like a normal Rust crate.
8888

8989
One final thing: [`src/llvm-project`] is a submodule for our fork of LLVM.
90-
During bootstrapping, LLVM is built and the [`src/librustc_llvm`] and
91-
[`src/rustllvm`] crates contain rust wrappers around LLVM (which is written in
92-
C++), so that the compiler can interface with it.
90+
During bootstrapping, LLVM is built and the [`compiler/rustc_llvm`] crate
91+
contains rust wrappers around LLVM (which is written in C++), so that the
92+
compiler can interface with it.
9393

9494
Most of this book is about the compiler, so we won't have any further
9595
explanation of these crates here.
9696

97-
[`src/llvm-project`]: https://github.com/rust-lang/rust/tree/master/src
98-
[`src/librustc_llvm`]: https://github.com/rust-lang/rust/tree/master/src
99-
[`src/rustllvm`]: https://github.com/rust-lang/rust/tree/master/src
97+
[`src/llvm-project`]: https://github.com/rust-lang/rust/tree/master/src/
98+
[`compiler/rustc_llvm`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm
10099

101100
### Big picture
102101

0 commit comments

Comments
 (0)