Skip to content

Commit ce25acc

Browse files
authored
fix(build): honor Cargo target directory when staging binaries (#3262)
Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
1 parent 226a83b commit ce25acc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tasks/scripts/stage-prebuilt-binaries.sh‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ build_component_for_arch() {
171171
local current_host_os
172172
local current_host_arch
173173
local binary_path
174+
local cargo_output_dir
174175
local build_rustflags
175176

176177
resolve_component "$component"
@@ -257,7 +258,8 @@ build_component_for_arch() {
257258
CARGO_INCREMENTAL=0 mise x -- ${cargo_env[@]+"${cargo_env[@]}"} "${cargo_subcommand[@]}" "${args[@]}"
258259
)
259260

260-
binary_path="${ROOT}/target/${target}/release/${binary}"
261+
cargo_output_dir="$(cd "$ROOT" && mise x -- cargo metadata --format-version=1 --no-deps | jq -er '.target_directory')"
262+
binary_path="${cargo_output_dir}/${target}/release/${binary}"
261263
if [[ "$component" == "gateway" ]]; then
262264
"$SCRIPT_DIR/verify-glibc-symbols.sh" 2.28 "$binary_path"
263265
elif [[ "$component" == "supervisor" ]]; then

0 commit comments

Comments
 (0)