diff --git a/build/Makefile b/build/Makefile index 65fe0624fe..322b42dacf 100644 --- a/build/Makefile +++ b/build/Makefile @@ -30,7 +30,6 @@ package_version := $(shell grep version -m 1 $(project_path)/Cargo.toml | awk '{ common_rust_args := -v $(project_path):/workspace -w /workspace \ -v $(CARGO_HOME)/registry:/usr/local/cargo/registry -docker_in_docker := -v /var/run/docker.sock:/var/run/docker.sock # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -91,17 +90,17 @@ binary-archive: ensure-build-image build-all-binaries # Build release and debug binaries for x86_64-unknown-linux-gnu build-linux-binary: ensure-build-image - docker run --rm $(common_rust_args) $(docker_in_docker) \ - --entrypoint=cross $(BUILD_IMAGE_TAG) build --target x86_64-unknown-linux-gnu - docker run --rm $(common_rust_args) $(docker_in_docker) \ - --entrypoint=cross $(BUILD_IMAGE_TAG) build --target x86_64-unknown-linux-gnu --release + docker run --rm $(common_rust_args) \ + --entrypoint=cargo $(BUILD_IMAGE_TAG) build --target x86_64-unknown-linux-gnu + docker run --rm $(common_rust_args) \ + --entrypoint=cargo $(BUILD_IMAGE_TAG) build --target x86_64-unknown-linux-gnu --release # Build release and debug binaries for x86_64-pc-windows-gnu build-windows-binary: ensure-build-image - docker run --rm $(common_rust_args) $(docker_in_docker) \ - --entrypoint=cross $(BUILD_IMAGE_TAG) build --target x86_64-pc-windows-gnu - docker run --rm $(common_rust_args) $(docker_in_docker) \ - --entrypoint=cross $(BUILD_IMAGE_TAG) build --target x86_64-pc-windows-gnu --release + docker run --rm $(common_rust_args) \ + --entrypoint=cargo $(BUILD_IMAGE_TAG) build --target x86_64-pc-windows-gnu + docker run --rm $(common_rust_args) \ + --entrypoint=cargo $(BUILD_IMAGE_TAG) build --target x86_64-pc-windows-gnu --release # Build release and debug binaries for x86_64-apple-darwin build-macos-binary: diff --git a/build/build-image/Dockerfile b/build/build-image/Dockerfile index d3168e8a10..baeec5877e 100644 --- a/build/build-image/Dockerfile +++ b/build/build-image/Dockerfile @@ -26,7 +26,7 @@ ENV RUSTUP_HOME=/usr/local/rustup \ # Install packages RUN set -eux && \ apt-get update && \ - apt-get install -y jq wget zip build-essential libssl-dev pkg-config python3-pip && \ + apt-get install -y jq wget zip build-essential libssl-dev pkg-config python3-pip g++-mingw-w64-x86-64 && \ pip3 install live-server # Install htmltest @@ -41,10 +41,10 @@ RUN wget https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustu rm rustup-init && \ chmod -R a+w $RUSTUP_HOME $CARGO_HOME && \ rustup component add rustfmt clippy && \ - cargo install cross cargo-watch mdbook && \ + rustup target add x86_64-pc-windows-gnu && \ + cargo install cargo-watch mdbook && \ cargo install cargo-about && \ cargo install --locked cargo-deny && \ rustup --version && \ cargo --version && \ - rustc --version && \ - cross --version + rustc --version