Skip to content
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

Rust 1.66.0 #1597

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions config/core/build-configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,14 @@ build_environments:
<<: *x86_64_params
name:

rustc-1.66:
cc: clang
cc_version: 15
arch_params:
x86_64:
<<: *x86_64_params
name:

# Default config with full build coverage
build_configs_defaults:
variants:
Expand Down Expand Up @@ -1098,8 +1106,8 @@ build_configs:
tree: rust-for-linux
branch: 'rust'
variants:
rustc-1.62:
build_environment: rustc-1.62
rustc-1.66:
build_environment: rustc-1.66
fragments: [rust, rust-for-linux-samples, kselftest]
architectures:
x86_64:
Expand Down
43 changes: 43 additions & 0 deletions config/docker/rustc-1.66.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% extends 'clang-15.jinja2' %}

{% block packages %}
{{ super() }}

ARG RUST_VER=1.66.0
ARG BINDGEN_VER=0.56.0

ARG RUST_TRIPLE=rust-${RUST_VER}-x86_64-unknown-linux-gnu

ENV CARGO_HOME=/home/kernelci/.cargo
ENV PATH=/usr/${RUST_TRIPLE}/bin:${CARGO_HOME}/bin:${PATH}

ARG SHA256SUM=f6ff8b7a38bab7d8f3cb7b70c7201494a5485c2cf12e84a13c9e232fa51ebfe7

# fetch, verify the toolchain
RUN wget https://static.rust-lang.org/dist/${RUST_TRIPLE}.tar.gz && \
echo "${SHA256SUM} ${RUST_TRIPLE}.tar.gz" | sha256sum --check --quiet

# install & cleanup tmp files
RUN tar -xf ${RUST_TRIPLE}.tar.gz -C /tmp/ && \
/tmp/${RUST_TRIPLE}/install.sh --prefix=/usr/${RUST_TRIPLE} \
--components=rustc,cargo,rust-std-x86_64-unknown-linux-gnu && \
rm -rf /tmp/${RUST_TRIPLE} && \
rm /${RUST_TRIPLE}*

# This image is based on clang-*jinja2 which only has clang installed, but rustc
# defaults to linker "cc" which usually points to the GNU/GCC stack. Pointing cc
# to clang ensures both cargo and kernel build rustc invocations use llvm/clang.
RUN update-alternatives --install /usr/bin/cc cc $(which clang) 30 && \
update-alternatives --set cc $(which clang)

RUN git clone --recurse-submodules --branch $RUST_VER \
https://github.com/rust-lang/rust \
$(rustc --print sysroot)/lib/rustlib/src/rust

RUN cargo install --locked --version ${BINDGEN_VER} bindgen

# kernel build generates some rust code and tries to format it, if rustfmt is
# missing it will print non-fatal error noise
RUN cargo install rustfmt

{%- endblock %}