summaryrefslogtreecommitdiffhomepage
path: root/building
diff options
context:
space:
mode:
authorLinus Färnstrand <faern@faern.net>2023-02-08 14:46:18 +0100
committerLinus Färnstrand <faern@faern.net>2023-02-09 09:37:07 +0100
commit4c560f27cfa21c77bb3e73a375e3c74db031bbf7 (patch)
treec2872b2e5c91c74db1a511f72b33a5861442347e /building
parent5afa6f1fac79fa2abdf212c8928feac1b4e0e030 (diff)
downloadmullvadvpn-4c560f27cfa21c77bb3e73a375e3c74db031bbf7.tar.xz
mullvadvpn-4c560f27cfa21c77bb3e73a375e3c74db031bbf7.zip
Add clippy + the Windows toolchain into the container
Helps Linux developers by being able to lint/check towards Windows
Diffstat (limited to 'building')
-rw-r--r--building/Dockerfile12
1 files changed, 10 insertions, 2 deletions
diff --git a/building/Dockerfile b/building/Dockerfile
index e036834cc1..a1a4548476 100644
--- a/building/Dockerfile
+++ b/building/Dockerfile
@@ -38,13 +38,21 @@ RUN dpkg --add-architecture arm64 && apt-get update -y && apt-get install -y \
libdbus-1-dev libdbus-1-dev:arm64 \
rpm \
protobuf-compiler \
+ # For cross-compiling/linting towards Windows
+ gcc-mingw-w64-x86-64 \
&& rm -rf /var/lib/apt/lists/*
# === Rust ===
-# Install latest stable Rust toolchain for both x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu
+# Install latest stable Rust toolchain for both x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu,
+# plus x86_64-pc-windows-gnu for Windows cross-compilation/linting
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
- sh -s -- --default-toolchain stable --profile minimal --target aarch64-unknown-linux-gnu -y
+ sh -s -- -y \
+ --default-toolchain stable \
+ --profile minimal \
+ --component clippy \
+ --target aarch64-unknown-linux-gnu \
+ --target x86_64-pc-windows-gnu
ENV PATH=/root/.cargo/bin:$PATH
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc" \