Skip to content

Commit

Permalink
Rollup merge of #104158 - Ayush1325:executable, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
Return .efi extension for EFI executable

Originally part of #100316

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
  • Loading branch information
Manishearth authored Nov 14, 2022
2 parents e284780 + 758868c commit 7c67cb2
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 7c67cb2

Please sign in to comment.