Skip to content

Commit c1b2fd2

Browse files
authored
Rollup merge of rust-lang#71881 - IsaacWoods:master, r=petrochenkov
Correctly handle UEFI targets as Windows-like when emitting sections for LLVM bitcode This handles UEFI handles when emitting inline assembly for sections containing LLVM bitcode. See details in rust-lang#71880. I have locally confirmed that this change fixes compilation of projects using the `x86_64-unknown-uefi` target compiling with `cargo-xbuild`, but I am not very familiar with LLVM bitcode so this may not be the correct approach. r? @alexcrichton as they wrote the initial LLVM bitcode emitting code?
2 parents faccb0f + 6e77729 commit c1b2fd2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_codegen_llvm/back/write.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,9 @@ unsafe fn embed_bitcode(
853853
|| cgcx.opts.target_triple.triple().starts_with("asmjs")
854854
{
855855
// nothing to do here
856-
} else if cgcx.opts.target_triple.triple().contains("windows") {
856+
} else if cgcx.opts.target_triple.triple().contains("windows")
857+
|| cgcx.opts.target_triple.triple().contains("uefi")
858+
{
857859
let asm = "
858860
.section .llvmbc,\"n\"
859861
.section .llvmcmd,\"n\"

0 commit comments

Comments
 (0)