Rollup merge of #104158 - Ayush1325:executable, r=Mark-Simulacrum
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:
commit
7c67cb2300
@ -44,7 +44,13 @@ pub use t;
|
|||||||
/// Given an executable called `name`, return the filename for the
|
/// Given an executable called `name`, return the filename for the
|
||||||
/// executable for a particular target.
|
/// executable for a particular target.
|
||||||
pub fn exe(name: &str, target: TargetSelection) -> String {
|
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.
|
/// Returns `true` if the file name given looks like a dynamic library.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user