Missing symbols with thin LTO on x86_64-pc-windows-msvc #71720
Labels
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
O-windows
Operating system: Windows
O-windows-msvc
Toolchain: MSVC, Operating system: Windows
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I tried this code:
with this
Cargo.toml
file:I compiled this (successfully) with
cargo build --release
, which producedtarget/release/msvc_lto_thin_bug.lib
. I then tried to compile this C program (foobar.c
):via:
I expected to see this happen: The program linked (although it obviously wouldn't do anything useful).
Instead, this happened:
Meta
I have no idea what I'm doing on Windows; this is a reproducer from investigating a Windows build problem on a project I primarily develop on Mac/Linux (neither of which exhibit any problems with the above example).
The missing symbol demangles to
__imp_memchr::x86::memchr3::FN::...
, which I believe is an always inlined function in thememchr
crate?rustc --version --verbose
:I tried the current (2020-04-29) nightly and got the same results.
The text was updated successfully, but these errors were encountered: