diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2022-11-13 21:49:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-13 21:49:25 -0500 |
| commit | 7c67cb230064f89a7b553136c778caecb06b18e2 (patch) | |
| tree | f3de605154d24aaed56b370bf5ad11048c7f68f9 | |
| parent | e284780cf64381eeb0379d09a6f4896b239db9b1 (diff) | |
| parent | 758868cb09bca3a97e18debb7058af8dc5f76f62 (diff) | |
| download | rust-7c67cb230064f89a7b553136c778caecb06b18e2.tar.gz rust-7c67cb230064f89a7b553136c778caecb06b18e2.zip | |
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>
| -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 8a2f46abbd2..58220783228 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. |
