From 6c4f4672c88d6206891c3a2429eb0d51a170bce4 Mon Sep 17 00:00:00 2001 From: Piotr Mlocek Date: Thu, 10 Sep 2026 11:49:29 -0700 Subject: [PATCH] fix(build): honor Cargo target directory when staging binaries Signed-off-by: Piotr Mlocek --- tasks/scripts/stage-prebuilt-binaries.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/scripts/stage-prebuilt-binaries.sh b/tasks/scripts/stage-prebuilt-binaries.sh index b3f75bbaba..8f40788ffa 100755 --- a/tasks/scripts/stage-prebuilt-binaries.sh +++ b/tasks/scripts/stage-prebuilt-binaries.sh @@ -171,6 +171,7 @@ build_component_for_arch() { local current_host_os local current_host_arch local binary_path + local cargo_output_dir local build_rustflags resolve_component "$component" @@ -257,7 +258,8 @@ build_component_for_arch() { CARGO_INCREMENTAL=0 mise x -- ${cargo_env[@]+"${cargo_env[@]}"} "${cargo_subcommand[@]}" "${args[@]}" ) - binary_path="${ROOT}/target/${target}/release/${binary}" + cargo_output_dir="$(cd "$ROOT" && mise x -- cargo metadata --format-version=1 --no-deps | jq -er '.target_directory')" + binary_path="${cargo_output_dir}/${target}/release/${binary}" if [[ "$component" == "gateway" ]]; then "$SCRIPT_DIR/verify-glibc-symbols.sh" 2.28 "$binary_path" elif [[ "$component" == "supervisor" ]]; then