1
Fork 0

Rollup merge of #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 #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?
This commit is contained in:
Dylan DPC 2020-05-05 01:49:44 +02:00 committed by GitHub
commit c1b2fd2121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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\"