diff options
| author | Ralf Jung <post@ralfj.de> | 2023-01-13 11:46:54 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-01-13 11:46:54 +0100 |
| commit | 9475277c235d2297dc446155325b0b3fcfdbf722 (patch) | |
| tree | bf243b402462c46038a1692d4ab52a7148b75d52 /compiler/rustc_codegen_ssa/src/codegen_attrs.rs | |
| parent | 9742679ebed966c62bf457df8353b9a5c6c22d29 (diff) | |
| parent | 7d59c0ccaa3aeb528a66ae3d2fec6a5ebbe44bc2 (diff) | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/codegen_attrs.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/codegen_attrs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs index b0fa7745667..8808ad2dcd1 100644 --- a/compiler/rustc_codegen_ssa/src/codegen_attrs.rs +++ b/compiler/rustc_codegen_ssa/src/codegen_attrs.rs @@ -658,13 +658,13 @@ fn check_link_ordinal(tcx: TyCtxt<'_>, attr: &ast::Attribute) -> Option<u16> { sole_meta_list { // According to the table at https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#import-header, - // the ordinal must fit into 16 bits. Similarly, the Ordinal field in COFFShortExport (defined + // the ordinal must fit into 16 bits. Similarly, the Ordinal field in COFFShortExport (defined // in llvm/include/llvm/Object/COFFImportFile.h), which we use to communicate import information // to LLVM for `#[link(kind = "raw-dylib"_])`, is also defined to be uint16_t. // // FIXME: should we allow an ordinal of 0? The MSVC toolchain has inconsistent support for this: // both LINK.EXE and LIB.EXE signal errors and abort when given a .DEF file that specifies - // a zero ordinal. However, llvm-dlltool is perfectly happy to generate an import library + // a zero ordinal. However, llvm-dlltool is perfectly happy to generate an import library // for such a .DEF file, and MSVC's LINK.EXE is also perfectly happy to consume an import // library produced by LLVM with an ordinal of 0, and it generates an .EXE. (I don't know yet // if the resulting EXE runs, as I haven't yet built the necessary DLL -- see earlier comment |
