Skip to content

Commit 8794ca2

Browse files
committed
Clarify comment
1 parent 643dd8c commit 8794ca2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/rustc_codegen_llvm/src/consts.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,10 @@ impl<'ll> CodegenCx<'ll, '_> {
324324
// Local definitions can never be imported, so we must not apply
325325
// the DLLImport annotation.
326326
&& !dso_local
327-
// ThinLTO can't handle this workaround in all cases, so we don't
328-
// emit the attrs. Instead we make them unnecessary by disallowing
329-
// dynamic linking when linker plugin based LTO is enabled.
327+
// Linker plugin ThinLTO doesn't create the self-dllimport Rust uses for rlibs
328+
// as the code generation happens out of process. Instead we assume static linkage
329+
// and disallow dynamic linking when linker plugin based LTO is enabled.
330+
// Regular in-process ThinLTO doesn't need this workaround.
330331
&& !self.tcx.sess.opts.cg.linker_plugin_lto.enabled();
331332

332333
// If this assertion triggers, there's something wrong with commandline

0 commit comments

Comments
 (0)