Fix Rust installation for Corrosion

This commit is contained in:
BoloniniD 2022-09-18 11:50:44 +03:00
parent 627dea333e
commit 7b5d3e3d82
2 changed files with 8 additions and 2 deletions

View File

@ -23,6 +23,9 @@ endif()
if((CMAKE_TOOLCHAIN_FILE MATCHES "darwin") AND (CMAKE_TOOLCHAIN_FILE MATCHES "toolchain-aarch64"))
set(Rust_CARGO_TARGET "aarch64-apple-darwin")
message(STATUS "Rust is not available on aarch64-apple-darwin")
option(ENABLE_RUST "Enable rust" FALSE)
return()
endif()
if((CMAKE_TOOLCHAIN_FILE MATCHES "darwin") AND (CMAKE_TOOLCHAIN_FILE MATCHES "x86_64"))

View File

@ -4,9 +4,12 @@ ARG FROM_TAG=latest
FROM clickhouse/test-util:$FROM_TAG
# Rust toolchain and libraries
ENV RUSTUP_HOME=/rust/rustup
ENV CARGO_HOME=/rust/cargo
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN chmod 777 -R /root/.cargo/bin
RUN chmod 777 -R /rust
ENV PATH="/rust/cargo/env:${PATH}"
ENV PATH="/rust/cargo/bin:${PATH}"
RUN rustup target add aarch64-unknown-linux-gnu && \
rustup target add x86_64-apple-darwin && \
rustup target add x86_64-unknown-freebsd && \