From 7043e9e932ce6f4f6846e57ecd4cdd30890d2072 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 17 Mar 2024 18:54:24 +0100 Subject: [PATCH] Prevent the build cache for the installer getting clobbered Previously it was getting built by two different toolchains (nightly from rustup and the relibc prefix) Also some env vars differed between both invocations causing blake3 and sodiumoxide to get rebuilt. --- mk/config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/config.mk b/mk/config.mk index e40e096..5e0bfc8 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -22,8 +22,9 @@ FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml else FILESYSTEM_CONFIG?=config/$(ARCH)/$(BOARD)/$(CONFIG_NAME).toml endif +HOST_CARGO=env -u RUSTUP_TOOLCHAIN -u CC -u TARGET cargo ## Filesystem size in MB (default comes from filesystem_size in the FILESYSTEM_CONFIG) -FILESYSTEM_SIZE?=$(shell cargo run --release --manifest-path installer/Cargo.toml -- --filesystem-size -c $(FILESYSTEM_CONFIG)) +FILESYSTEM_SIZE?=$(shell $(HOST_CARGO) run --release --manifest-path installer/Cargo.toml -- --filesystem-size -c $(FILESYSTEM_CONFIG)) ## Flags to pass to redoxfs-mkfs. Add --encrypt to set up disk encryption REDOXFS_MKFS_FLAGS?= ## Set to 1 to enable Podman build, any other value will disable it @@ -32,7 +33,6 @@ PODMAN_BUILD?=0 CONTAINERFILE?=podman/redox-base-containerfile # Per host variables -HOST_CARGO=env -u RUSTUP_TOOLCHAIN cargo export NPROC=nproc export REDOX_MAKE=make HOST_TARGET := $(shell env -u RUSTUP_TOOLCHAIN rustc -vV | grep host | cut -d: -f2 | tr -d " ")