Skip to content

Commit a5892d4

Browse files
committed
added comment
1 parent 6bb47f4 commit a5892d4

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_codegen_llvm/src/back

1 file changed

+2
-0
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+2
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,8 @@ pub fn target_machine_factory(
220220
let use_init_array =
221221
!sess.opts.unstable_opts.use_ctors_section.unwrap_or(sess.target.use_ctors_section);
222222

223+
// this annotes in the debug file that code is hotpatchable. In addtion without it -functionpadmin will be ignored.
224+
// See: https://github.com/llvm/llvm-project/blob/d703b922961e0d02a5effdd4bfbb23ad50a3cc9f/lld/COFF/Writer.cpp#L1298
223225
let use_hotpatch = sess.opts.unstable_opts.ms_hotpatch && sess.target.is_x86();
224226

225227
let path_mapping = sess.source_map().path_mapping().clone();

0 commit comments

Comments
 (0)