unresolved symbol rdl_oom
when compiling cdylib
crate with no_global_oom_handling
on pc-windows-msvc
target
#138758
Labels
-Zbuild-std
Unstable Cargo option: Compile the standard library yourself.
A-allocators
Area: Custom and system allocators
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
O-windows-msvc
Toolchain: MSVC, Operating system: Windows
requires-nightly
This issue requires a nightly compiler in some way.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
Full repro crate available here: https://github.com/wmmc88/minimal-repros/tree/no_global_oom_handling
I tried this code:
lib.rs
Cargo.toml
.cargo/config.toml
I expected to see this happen: successful compilation
Instead, this happened:
On
pc-windows-msvc
target, this causes the following linker error:Some important observations:
lto = "thin"
causes the linker error to disappearcdylib
x86_64-pc-windows-msvc
andaarch64-pc-windows-msvc
cause this errorx86_64-unknown-linux-gnu
targetMeta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: