rust/compiler/rustc_codegen_llvm/src
bors 8de4b13845 Auto merge of #104679 - dvdhrm:rw/dso, r=petrochenkov
codegen-llvm: never combine DSOLocal and DllImport

Prevent DllImport from being attached to DSOLocal definitions in the LLVM IR. The combination makes no sense, since definitions local to the compilation unit will never be imported from external objects.

Additionally, LLVM will refuse the IR if it encounters the combination (introduced in [1]):

```
  if (GV.hasDLLImportStorageClass())
    Assert(!GV.isDSOLocal(),
           "GlobalValue with DLLImport Storage is dso_local!", &GV);
```

Right now, codegen-llvm will only apply DllImport to constants and rely on call-stubs for functions. Hence, we simply extend the codegen of constants to skip DllImport for any local definitions.

This was discovered when switching the EFI targets to the static relocation model [2]. With this fixed, we can start another attempt at this.

[1] 509132b368
[2] https://github.com/rust-lang/rust/issues/101656
2022-11-30 04:18:15 +00:00
..
back Rollup merge of #104105 - davidtwco:split-dwarf-lto, r=michaelwoerister 2022-11-13 21:49:25 -05:00
coverageinfo Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
debuginfo Unreserve braced enum variants in value namespace 2022-11-21 22:40:06 +03:00
llvm Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
abi.rs Improve generating Custom entry function 2022-11-11 01:04:39 +05:30
allocator.rs Rewrite implementation of #[alloc_error_handler] 2022-10-31 16:32:57 +00:00
asm.rs Rollup merge of #103977 - TimNN:memory-effects, r=nikic 2022-11-05 00:02:05 +01:00
attributes.rs Simplify existing Diagnostic implementations 2022-11-09 14:56:21 +01:00
base.rs Remove several unused methods from MiscMethods 2022-10-01 16:45:07 +00:00
builder.rs Use &mut Bx more. 2022-11-16 15:46:39 +11:00
callee.rs Workaround for private global symbol issue 2022-11-18 11:38:31 -08:00
common.rs Introduce a fallible variant of LLVMConstIntGetZExtValue 2022-09-09 15:54:14 +02:00
consts.rs codegen-llvm: never combine DSOLocal and DllImport 2022-11-29 10:57:25 +01:00
context.rs Rollup merge of #104001 - Ayush1325:custom-entry, r=bjorn3 2022-11-19 11:54:43 +05:30
declare.rs Improve generating Custom entry function 2022-11-11 01:04:39 +05:30
errors.rs Use LayoutError's implementation of IntoDiagnostic 2022-11-09 14:56:21 +01:00
intrinsic.rs Add Mutability::{is_mut,is_not} 2022-11-23 20:26:31 +00:00
lib.rs Port diagnostics created by Handler 2022-11-09 14:56:21 +01:00
llvm_util.rs Rollup merge of #104627 - calebzulawski:print-target-features, r=compiler-errors 2022-11-29 22:43:17 +01:00
mono_item.rs Fix diag() and formatting 2022-11-09 14:56:20 +01:00
type_.rs Prefer doc comments over //-comments in compiler 2022-11-27 11:19:04 +00:00
type_of.rs add is_sized method on Abi and Layout, and use it 2022-11-13 12:23:53 +01:00
va_arg.rs Introduce Bx::switch_to_block 2022-02-24 12:18:21 +01:00
value.rs