]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #91654 - nikic:llvmbc-section-flags, r=nagisa
authorbors <bors@rust-lang.org>
Mon, 13 Dec 2021 10:35:28 +0000 (10:35 +0000)
committerbors <bors@rust-lang.org>
Mon, 13 Dec 2021 10:35:28 +0000 (10:35 +0000)
commita737592a3d8f0f5ec76524c880d226f28bef2c84
treeab4c9d5372b5ee45a48a21b0a1e8a8aa08c384a8
parent6d6d0899c8bf9d321ffa12426ca7ae7e3e15478a
parent509dedccacbce22c291da3bf85468fcdb92303d4
Auto merge of #91654 - nikic:llvmbc-section-flags, r=nagisa

Use module inline assembly to embed bitcode

In LLVM 14, our current method of setting section flags to avoid
embedding the `.llvmbc` section into final compilation artifacts
will no longer work, see issue #90326. The upstream recommendation
is to instead embed the entire bitcode using module-level inline
assembly, which is what this change does.

I've kept the existing code for platforms where we do not need to
set section flags, but possibly we should always be using the
inline asm approach (which would have to look a bit different for MachO).

r? `@nagisa`
compiler/rustc_codegen_llvm/src/back/write.rs