Return .efi extension for EFI executable
Originally part of https://github.com/rust-lang/rust/pull/100316 Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
This commit is contained in:
parent
57d3c58ed6
commit
758868cb09
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user