Skip to content

Commit 57b4d81

Browse files
d3zd3znashif
authored andcommitted
ci: Add rust target support
Invoke `rust target add ...` for each of the targets supported by Zephyr. There is a bit of a catch-22 here. We should be getting this list from the build, but the change that adds Rust support can't merge until Rust support has been tested. Once the first PR is merged, and the zephyr/lib/rust/targets.txt file exists, the hardcoded list here can be replaced by a loop that adds each of these targest. All of the targets adds about 300Mb to the image, as these targets only include a fairly minimal 'core' and 'alloc' library. Signed-off-by: David Brown <[email protected]>
1 parent 3d6e4e2 commit 57b4d81

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Dockerfile.ci

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,17 @@ RUN wget -q -O- "https://sh.rustup.rs" | sh -s -- -y
8989
# Install uefi-run utility
9090
RUN ~/.cargo/bin/cargo install uefi-run --root /usr
9191

92+
# Install target support for Rust. This is the list as of the current
93+
# time.
94+
RUN \
95+
~/.cargo/bin/rustup target install riscv32i-unknown-none-elf && \
96+
~/.cargo/bin/rustup target install riscv64imac-unknown-none-elf && \
97+
~/.cargo/bin/rustup target install thumbv6m-none-eabi && \
98+
~/.cargo/bin/rustup target install thumbv7em-none-eabi && \
99+
~/.cargo/bin/rustup target install thumbv7m-none-eabi && \
100+
~/.cargo/bin/rustup target install thumbv8m.main-none-eabi && \
101+
~/.cargo/bin/rustup target install x86_64-unknown-none
102+
92103
# Install LLVM and Clang
93104
RUN wget ${WGET_ARGS} https://apt.llvm.org/llvm.sh && \
94105
chmod +x llvm.sh && \

0 commit comments

Comments
 (0)