Closed SlyMarbo closed 2 years ago
Eyeballing the code here and comparing it with the layout produced by rules_rust, this should be working already. As mentioned above, rules_rust already pulls in llvm-tools
. rustc
is at @rust_linux_x86_64//bin:rustc
and calling rustc --print sysroot
returns an absolute path to @rust_linux_x86_64
. The llvm-tools
crate effectively looks for SYSROOT/lib/rustlib/*/bin/llvm-objdump
. Locally, that works, resolving to the path @rust_linux_x86_64//lib/rustlib/x86_64-unknown-linux-gnu/bin:llvm-objdump
.
I'm going to leave this as low priority for now, unless it starts causing real issues.
I reckon this is fixed by 813727b8c767937cafa84da64b8c586d38f22a46. If that turns out not to be true, this can be reopened later.
We currently use
llvm-tools
in both the bootloader's build script and the bootimage to build the bootable image. In both cases, this uses thellvm-tools
crate. This will work correctly if the tools have been installed withrustup component add llvm-tools-preview
, but not if they haven't. We don't want to depend on Rust having been installed previously outside Bazel.It appears that the
llvm-tools
are installed byrules_rust
by default, so they are available in Bazel, they just aren't being picked up by thellvm-tools
crate. We should fix that, then we'll have one fewer requirement on the host environment.