File tree 1 file changed +4
-3
lines changed
compiler/rustc_codegen_llvm/src
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -324,9 +324,10 @@ impl<'ll> CodegenCx<'ll, '_> {
324
324
// Local definitions can never be imported, so we must not apply
325
325
// the DLLImport annotation.
326
326
&& !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.
330
331
&& !self . tcx . sess . opts . cg . linker_plugin_lto . enabled ( ) ;
331
332
332
333
// If this assertion triggers, there's something wrong with commandline
You can’t perform that action at this time.
0 commit comments