]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #89025 - ricobbe:raw-dylib-link-ordinal, r=michaelwoerister
authorJubilee <46493976+workingjubilee@users.noreply.github.com>
Fri, 8 Oct 2021 03:26:11 +0000 (20:26 -0700)
committerGitHub <noreply@github.com>
Fri, 8 Oct 2021 03:26:11 +0000 (20:26 -0700)
commit6c17601a2e6fa55e5d2ec7284359bee931c0c61a
treecb4a16d19fd744ee5bf6bd608b59b5b1c822044b
parent2b6d7f75f7f5ac0bce2265b0e33256356441ccba
parent142f6c0b078ceef1dc817c418f628d350551f6e4
Rollup merge of #89025 - ricobbe:raw-dylib-link-ordinal, r=michaelwoerister

Implement `#[link_ordinal(n)]`

Allows the use of `#[link_ordinal(n)]` with `#[link(kind = "raw-dylib")]`, allowing Rust to link against DLLs that export symbols by ordinal rather than by name.  As long as the ordinal matches, the name of the function in Rust is not required to match the name of the corresponding function in the exporting DLL.

Part of #58713.
compiler/rustc_codegen_llvm/src/back/archive.rs
compiler/rustc_codegen_llvm/src/llvm/ffi.rs
compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
compiler/rustc_metadata/src/native_libs.rs
compiler/rustc_typeck/src/collect.rs