about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2024-11-25 00:39:05 +0800
committerGitHub <noreply@github.com>2024-11-25 00:39:05 +0800
commit8d20d71256af83d1e26a1f8c402c9938d3d1de86 (patch)
treea7182a13660766d3e7a752ccce0b4116e1b58fb3 /compiler/rustc_codegen_llvm/src
parent6bf9a2363dc4546c3d476d2945fe5444d5b642d8 (diff)
parent7cc5feea4d31a96e23c95f26fbee8e77a968c937 (diff)
downloadrust-8d20d71256af83d1e26a1f8c402c9938d3d1de86.tar.gz
rust-8d20d71256af83d1e26a1f8c402c9938d3d1de86.zip
Rollup merge of #133297 - DianQK:embed-bitcode-ios, r=nikic
Remove legacy bitcode for iOS

Follow #117364.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs19
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,