Skip to content

Commit 5115538

Browse files
committed
embed-bitcode is no longer used in iOS
1 parent 0b1bf71 commit 5115538

File tree

1 file changed

+1
-18
lines changed
  • compiler/rustc_codegen_llvm/src/back

1 file changed

+1
-18
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+1-18
Original file line numberDiff line numberDiff line change
@@ -955,24 +955,7 @@ pub(crate) fn bitcode_section_name(cgcx: &CodegenContext<LlvmCodegenBackend>) ->
955955
}
956956
}
957957

958-
/// Embed the bitcode of an LLVM module in the LLVM module itself.
959-
///
960-
/// This is done primarily for iOS where it appears to be standard to compile C
961-
/// code at least with `-fembed-bitcode` which creates two sections in the
962-
/// executable:
963-
///
964-
/// * __LLVM,__bitcode
965-
/// * __LLVM,__cmdline
966-
///
967-
/// It appears *both* of these sections are necessary to get the linker to
968-
/// recognize what's going on. A suitable cmdline value is taken from the
969-
/// target spec.
970-
///
971-
/// Furthermore debug/O1 builds don't actually embed bitcode but rather just
972-
/// embed an empty section.
973-
///
974-
/// Basically all of this is us attempting to follow in the footsteps of clang
975-
/// on iOS. See #35968 for lots more info.
958+
/// Embed the bitcode of an LLVM module for LTO in the LLVM module itself.
976959
unsafe fn embed_bitcode(
977960
cgcx: &CodegenContext<LlvmCodegenBackend>,
978961
llcx: &llvm::Context,

0 commit comments

Comments
 (0)