Skip to content

Commit

Permalink
Return .efi extension for EFI executable
Browse files Browse the repository at this point in the history
Originally part of #100316

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
  • Loading branch information
Ayush1325 committed Nov 8, 2022
1 parent 57d3c58 commit 758868c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bootstrap/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ pub use t;
/// Given an executable called `name`, return the filename for the
/// executable for a particular target.
pub fn exe(name: &str, target: TargetSelection) -> String {
if target.contains("windows") { format!("{}.exe", name) } else { name.to_string() }
if target.contains("windows") {
format!("{}.exe", name)
} else if target.contains("uefi") {
format!("{}.efi", name)
} else {
name.to_string()
}
}

/// Returns `true` if the file name given looks like a dynamic library.
Expand Down

0 comments on commit 758868c

Please sign in to comment.