mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +00:00
Another attempt at fixing Docker cross-platform builds
This commit is contained in:
@@ -16,9 +16,6 @@ repository.workspace = true
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
publish = false
|
publish = false
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
lto = true
|
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
debug = 0
|
debug = 0
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ ARG TARGETPLATFORM
|
|||||||
ARG BUILDPLATFORM
|
ARG BUILDPLATFORM
|
||||||
|
|
||||||
# the compiler will otherwise ask for aarch64-linux-musl-gcc
|
# the compiler will otherwise ask for aarch64-linux-musl-gcc
|
||||||
ENV CC_aarch64_unknown_linux_musl=gcc
|
ENV CC_aarch64_unknown_linux_musl="clang"
|
||||||
|
ENV AR_aarch64_unknown_linux_musl="llvm-ar"
|
||||||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"
|
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld"
|
||||||
|
|
||||||
# Stupid workaound with tempfiles since environment variables
|
# Stupid workaound with tempfiles since environment variables
|
||||||
@@ -15,7 +16,7 @@ RUN case $TARGETPLATFORM in \
|
|||||||
*) echo "Unsupported platform ${TARGETPLATFORM}"; exit 1;; \
|
*) echo "Unsupported platform ${TARGETPLATFORM}"; exit 1;; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
RUN apk add --no-cache musl-dev gcc \
|
RUN apk add --no-cache musl-dev llvm19 clang \
|
||||||
&& rustup target add "$(cat /tmp/rust_target)" \
|
&& rustup target add "$(cat /tmp/rust_target)" \
|
||||||
&& cargo install cargo-chef --locked \
|
&& cargo install cargo-chef --locked \
|
||||||
&& rm -rf "$CARGO_HOME/registry"
|
&& rm -rf "$CARGO_HOME/registry"
|
||||||
|
|||||||
Reference in New Issue
Block a user