From 7de1af043ef49b9f93671e9f1eab485158b24f0d Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Fri, 28 Jul 2023 23:37:00 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Add=20RUST=5FSTD=20to=20c?= =?UTF-8?q?lippy=20invocation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Combine both parts of RUST_STD and RUST_STD_FEATURES into a single option, easier to control, harder to miss. --- Makefile.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile.toml b/Makefile.toml index 849eafa..a71b28b 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -42,8 +42,7 @@ VOLUME = { value = "/Volumes/BOOT", condition = { env_not_set = ["VOLUME"] } } # CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true -RUST_STD = "-Zbuild-std=compiler_builtins,core,alloc" -RUST_STD_FEATURES = "-Zbuild-std-features=compiler-builtins-mem" +RUST_STD = "-Zbuild-std=compiler_builtins,core,alloc -Zbuild-std-features=compiler-builtins-mem" TARGET_JSON = "${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/targets/${TARGET}.json" PLATFORM_TARGET="--target=${TARGET_JSON} --features=${TARGET_FEATURES}" @@ -97,7 +96,7 @@ args = ["modules", "tree"] [tasks.do-build] command = "cargo" -args = ["build", "@@split(PLATFORM_TARGET, )", "@@remove-empty(RUST_STD)", "@@remove-empty(RUST_STD_FEATURES)", "--release"] +args = ["build", "@@split(PLATFORM_TARGET, )", "@@split(RUST_STD, )", "--release"] [tasks.build] disabled = true @@ -131,7 +130,7 @@ args = ["expand", "@@split(PLATFORM_TARGET, )", "--release"] [tasks.test] env = { "TARGET_FEATURES" = "${QEMU_FEATURES}" } command = "cargo" -args = ["test", "@@split(PLATFORM_TARGET, )", "@@remove-empty(RUST_STD)", "@@remove-empty(RUST_STD_FEATURES)"] +args = ["test", "@@split(PLATFORM_TARGET, )", "@@split(RUST_STD, )"] [tasks.docs] env = { "TARGET_FEATURES" = "" } @@ -141,7 +140,7 @@ args = ["doc", "--open", "--no-deps", "@@split(PLATFORM_TARGET, )"] [tasks.clippy] env = { "TARGET_FEATURES" = "rpi3", "CLIPPY_FEATURES" = { value = "--features=${CLIPPY_FEATURES}", condition = { env_set = ["CLIPPY_FEATURES"] } } } command = "cargo" -args = ["clippy", "@@split(PLATFORM_TARGET, )", "@@remove-empty(CLIPPY_FEATURES)", "--", "--deny", "warnings", "--allow", "deprecated"] +args = ["clippy", "@@split(PLATFORM_TARGET, )", "@@split(RUST_STD, )", "@@remove-empty(CLIPPY_FEATURES)", "--", "--deny", "warnings", "--allow", "deprecated"] # These tasks are written in cargo-make's own script to make it portable across platforms (no `basename` on Windows)