From b6f58ebd141e0ce442bcc6d1197d4263d94ebe24 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Tue, 14 Apr 2026 18:31:22 +0700 Subject: [PATCH] Update rust --- recipes/dev/rust/config-cross-linux.toml | 28 +++++++++++++++++++ ...bootstrap.toml => config-cross-redox.toml} | 0 recipes/dev/rust/recipe.toml | 3 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 recipes/dev/rust/config-cross-linux.toml rename recipes/dev/rust/{config-bootstrap.toml => config-cross-redox.toml} (100%) diff --git a/recipes/dev/rust/config-cross-linux.toml b/recipes/dev/rust/config-cross-linux.toml new file mode 100644 index 000000000..879616361 --- /dev/null +++ b/recipes/dev/rust/config-cross-linux.toml @@ -0,0 +1,28 @@ +[llvm] +download-ci-llvm = false +static-libstdcpp = false +link-shared = true + +[build] +host = ["TARGET"] +target = ["TARGET", "x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl"] +cargo-native-static = true +submodules = false +docs = false +tools = ["cargo", "clippy", "rustdoc", "rustfmt", "src"] +extended = true +verbose = 1 + +[install] +prefix = "install" +sysconfdir = "etc" + +[rust] +backtrace = false +codegen-tests = false + +[target.aarch64-unknown-linux-gnu] +llvm-config = "COOKBOOK_TOOLCHAIN/bin/llvm-config" + +[target.x86_64-unknown-linux-gnu] +llvm-config = "COOKBOOK_TOOLCHAIN/bin/llvm-config" diff --git a/recipes/dev/rust/config-bootstrap.toml b/recipes/dev/rust/config-cross-redox.toml similarity index 100% rename from recipes/dev/rust/config-bootstrap.toml rename to recipes/dev/rust/config-cross-redox.toml diff --git a/recipes/dev/rust/recipe.toml b/recipes/dev/rust/recipe.toml index 93e5b6c18..10d4b983d 100644 --- a/recipes/dev/rust/recipe.toml +++ b/recipes/dev/rust/recipe.toml @@ -20,7 +20,8 @@ dev-dependencies = [ script = """ if [ "${COOKBOOK_HOST_SYSROOT}" = "/usr" ]; then -cat ${COOKBOOK_RECIPE}/config-bootstrap.toml > config.toml +OS=$(echo "${TARGET}" | cut -d - -f3) +cat ${COOKBOOK_RECIPE}/config-cross-$OS.toml > config.toml sed -i "s|TARGET|${TARGET}|g" config.toml sed -i "s|COOKBOOK_TOOLCHAIN|${COOKBOOK_TOOLCHAIN}|g" config.toml