diff options
| author | Ayush Singh <ayushsingh1325@gmail.com> | 2022-11-08 23:01:15 +0530 |
|---|---|---|
| committer | Ayush Singh <ayushsingh1325@gmail.com> | 2022-11-08 23:01:15 +0530 |
| commit | 758868cb09bca3a97e18debb7058af8dc5f76f62 (patch) | |
| tree | ab2b4a1e2b67b2b5f620eb77b1167ba5d40d3f6e | |
| parent | 57d3c58ed6e0faf89a62411f96c000ffc9fd3937 (diff) | |
| download | rust-758868cb09bca3a97e18debb7058af8dc5f76f62.tar.gz rust-758868cb09bca3a97e18debb7058af8dc5f76f62.zip | |
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>
| -rw-r--r-- | src/bootstrap/util.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index 20c3801f0a5..73cea126e39 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -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. |
