Skip to content

Commit

Permalink
fix: elf name
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Sep 19, 2024
1 parent 23c97e9 commit 01e979e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/build/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,20 @@ pub(crate) fn copy_elf_to_output_dir(
HELPER_TARGET_SUBDIR.to_string()
};

// The ELF's file name is the binary name if it's specified. Otherwise, it is the root package
// name.
let original_elf_file_name = if !args.binary.is_empty() {
args.binary.clone()
} else {
root_package_name.unwrap().clone()
};

let original_elf_path = program_metadata
.target_directory
.join(target_dir_suffix)
.join(BUILD_TARGET)
.join("release")
.join(root_package_name.unwrap());
.join(original_elf_file_name);

// The order of precedence for the ELF name is:
// 1. --elf_name flag
Expand Down

0 comments on commit 01e979e

Please sign in to comment.