Skip to content

Commit

Permalink
Merge pull request #144 from rust-secure-code/refactor-binary-format
Browse files Browse the repository at this point in the history
More robust platform detection for picking the binary format
  • Loading branch information
Shnatsel authored May 2, 2024
2 parents 825fdce + 4d066b0 commit 4061210
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cargo-auditable/src/object_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ fn create_object_file(
// Unsupported architecture.
_ => return None,
};
let binary_format = if target_triple.contains("-apple-") {
let binary_format = if info["target_vendor"] == "apple" {
BinaryFormat::MachO
} else if target_triple.contains("-windows-") {
} else if info["target_os"] == "windows" {
BinaryFormat::Coff
} else {
BinaryFormat::Elf
Expand Down

0 comments on commit 4061210

Please sign in to comment.