Update links to `librustc_llvm` and `rustllvm`
This commit is contained in:
parent
584ccc7608
commit
470d5afe98
|
|
@ -98,9 +98,9 @@ through each in detail.
|
||||||
* `./x.py build src/tools/lld` - same for LLD
|
* `./x.py build src/tools/lld` - same for LLD
|
||||||
* `./x.py build` - build the rest of rustc
|
* `./x.py build` - build the rest of rustc
|
||||||
|
|
||||||
You'll likely need to update `src/rustllvm/*.cpp` to compile with updated
|
You'll likely need to update [`llvm-wrapper/*.cpp`][`llvm-wrapper`] to compile
|
||||||
LLVM bindings. Note that you should use `#ifdef` and such to ensure that the
|
with updated LLVM bindings. Note that you should use `#ifdef` and such to ensure
|
||||||
bindings still compile on older LLVM versions.
|
that the bindings still compile on older LLVM versions.
|
||||||
|
|
||||||
Note that `profile = "compiler"` and other defaults set by `x.py setup`
|
Note that `profile = "compiler"` and other defaults set by `x.py setup`
|
||||||
download LLVM from CI instead of building it from source. You should
|
download LLVM from CI instead of building it from source. You should
|
||||||
|
|
@ -133,18 +133,20 @@ through each in detail.
|
||||||
5. Prepare a PR to `rust-lang/rust`. Work with maintainers of
|
5. Prepare a PR to `rust-lang/rust`. Work with maintainers of
|
||||||
`rust-lang/llvm-project` to get your commit in a branch of that repository,
|
`rust-lang/llvm-project` to get your commit in a branch of that repository,
|
||||||
and then you can send a PR to `rust-lang/rust`. You'll change at least
|
and then you can send a PR to `rust-lang/rust`. You'll change at least
|
||||||
`src/llvm-project` and will likely also change `src/rustllvm/*` as well.
|
`src/llvm-project` and will likely also change [`llvm-wrapper`] as well.
|
||||||
|
|
||||||
For prior art, previous LLVM updates look like
|
For prior art, previous LLVM updates look like
|
||||||
[#55835](https://github.com/rust-lang/rust/pull/55835)
|
[#55835](https://github.com/rust-lang/rust/pull/55835)
|
||||||
[#47828](https://github.com/rust-lang/rust/pull/47828)
|
[#47828](https://github.com/rust-lang/rust/pull/47828)
|
||||||
[#62474](https://github.com/rust-lang/rust/pull/62474)
|
[#62474](https://github.com/rust-lang/rust/pull/62474)
|
||||||
[#62592](https://github.com/rust-lang/rust/pull/62592). Note that sometimes it's
|
[#62592](https://github.com/rust-lang/rust/pull/62592). Note that sometimes it's
|
||||||
easiest to land `src/rustllvm/*` compatibility as a PR before actually updating
|
easiest to land [`llvm-wrapper`] compatibility as a PR before actually updating
|
||||||
`src/llvm-project`. This way while you're working through LLVM issues others
|
`src/llvm-project`. This way while you're working through LLVM issues others
|
||||||
interested in trying out the new LLVM can benefit from work you've done to
|
interested in trying out the new LLVM can benefit from work you've done to
|
||||||
update the C++ bindings.
|
update the C++ bindings.
|
||||||
|
|
||||||
|
[`llvm-wrapper`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm/llvm-wrapper
|
||||||
|
|
||||||
### Caveats and gotchas
|
### Caveats and gotchas
|
||||||
|
|
||||||
Ideally the above instructions are pretty smooth, but here's some caveats to
|
Ideally the above instructions are pretty smooth, but here's some caveats to
|
||||||
|
|
|
||||||
|
|
@ -87,16 +87,15 @@ You can see the exact dependencies by reading the `Cargo.toml` for the various
|
||||||
crates, just like a normal Rust crate.
|
crates, just like a normal Rust crate.
|
||||||
|
|
||||||
One final thing: [`src/llvm-project`] is a submodule for our fork of LLVM.
|
One final thing: [`src/llvm-project`] is a submodule for our fork of LLVM.
|
||||||
During bootstrapping, LLVM is built and the [`src/librustc_llvm`] and
|
During bootstrapping, LLVM is built and the [`compiler/rustc_llvm`] crate
|
||||||
[`src/rustllvm`] crates contain rust wrappers around LLVM (which is written in
|
contains rust wrappers around LLVM (which is written in C++), so that the
|
||||||
C++), so that the compiler can interface with it.
|
compiler can interface with it.
|
||||||
|
|
||||||
Most of this book is about the compiler, so we won't have any further
|
Most of this book is about the compiler, so we won't have any further
|
||||||
explanation of these crates here.
|
explanation of these crates here.
|
||||||
|
|
||||||
[`src/llvm-project`]: https://github.com/rust-lang/rust/tree/master/src
|
[`src/llvm-project`]: https://github.com/rust-lang/rust/tree/master/src/
|
||||||
[`src/librustc_llvm`]: https://github.com/rust-lang/rust/tree/master/src
|
[`compiler/rustc_llvm`]: https://github.com/rust-lang/rust/tree/master/compiler/rustc_llvm
|
||||||
[`src/rustllvm`]: https://github.com/rust-lang/rust/tree/master/src
|
|
||||||
|
|
||||||
### Big picture
|
### Big picture
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue