From 6e77729ed5af41f87ffe8c8b7bd949b8b1d44f83 Mon Sep 17 00:00:00 2001 From: Isaac Woods Date: Mon, 4 May 2020 16:27:46 +0100 Subject: [PATCH] Correctly handle UEFI targets as Windows-like when emitting sections for LLVM bitcode --- src/librustc_codegen_llvm/back/write.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index 6d175fda45f5c..394e2f332cb21 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -853,7 +853,9 @@ unsafe fn embed_bitcode( || cgcx.opts.target_triple.triple().starts_with("asmjs") { // nothing to do here - } else if cgcx.opts.target_triple.triple().contains("windows") { + } else if cgcx.opts.target_triple.triple().contains("windows") + || cgcx.opts.target_triple.triple().contains("uefi") + { let asm = " .section .llvmbc,\"n\" .section .llvmcmd,\"n\"