diff options
| author | bors <bors@rust-lang.org> | 2024-11-24 23:17:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-11-24 23:17:56 +0000 |
| commit | 28fc2ba7142654fa6e654926f96ff913027b200e (patch) | |
| tree | 47ce907833aa4d4b770a5bb17ee0ebeac61b1c68 /compiler/rustc_codegen_llvm | |
| parent | 481b5fadd7994d0f04e9a6fe9ded3f22d6753825 (diff) | |
| parent | c50e19b69cf7f26fcd289c32a4f69adda5bc9470 (diff) | |
| download | rust-28fc2ba7142654fa6e654926f96ff913027b200e.tar.gz rust-28fc2ba7142654fa6e654926f96ff913027b200e.zip | |
Auto merge of #133423 - jieyouxu:rollup-m3gyoz6, r=jieyouxu
Rollup of 6 pull requests Successful merges: - #132730 (std: allow after-main use of synchronization primitives) - #133105 (only store valid proc macro item for doc link) - #133260 (Constify the `Deref`/`DerefMut` traits, too) - #133297 (Remove legacy bitcode for iOS) - #133298 (Mention that std::fs::remove_dir_all fails on files) - #133384 (add a test for target-feature-ABI warnings in closures and when calling extern fn) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index a65ae4df1e3..00f7b479fa7 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -955,24 +955,7 @@ pub(crate) fn bitcode_section_name(cgcx: &CodegenContext<LlvmCodegenBackend>) -> } } -/// Embed the bitcode of an LLVM module in the LLVM module itself. -/// -/// This is done primarily for iOS where it appears to be standard to compile C -/// code at least with `-fembed-bitcode` which creates two sections in the -/// executable: -/// -/// * __LLVM,__bitcode -/// * __LLVM,__cmdline -/// -/// It appears *both* of these sections are necessary to get the linker to -/// recognize what's going on. A suitable cmdline value is taken from the -/// target spec. -/// -/// Furthermore debug/O1 builds don't actually embed bitcode but rather just -/// embed an empty section. -/// -/// Basically all of this is us attempting to follow in the footsteps of clang -/// on iOS. See #35968 for lots more info. +/// Embed the bitcode of an LLVM module for LTO in the LLVM module itself. unsafe fn embed_bitcode( cgcx: &CodegenContext<LlvmCodegenBackend>, llcx: &llvm::Context, |
