about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2022-11-13 21:49:25 -0500
committerGitHub <noreply@github.com>2022-11-13 21:49:25 -0500
commit7c67cb230064f89a7b553136c778caecb06b18e2 (patch)
treef3de605154d24aaed56b370bf5ad11048c7f68f9
parente284780cf64381eeb0379d09a6f4896b239db9b1 (diff)
parent758868cb09bca3a97e18debb7058af8dc5f76f62 (diff)
downloadrust-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.rs8
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.