Link error when compiling reqwest with -C prefer-dynamic #82972
Labels
A-linkage
Area: linking into static, shared libraries and binaries
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I gather that prefer-dynamic isn't the preferred mode of compiling, but I use it in Evcxr to try and keep memory usage down when compiling and loading lots of .so files with similar dependencies.
Cargo.toml:
main.rs:
cargo build
succeeds, howevercargo rustc -- -C prefer-dynamic
fails to link with lots of missing symbols. e.g.:Meta
Got this behavior on nightly 2021-03-09 as well as stable versions back as far as 1.44. Prior that the code doesn't compile due to missing features.
rustc +nightly --version --verbose
:rustc 1.52.0-nightly (3a5d45f 2021-03-09)
binary: rustc
commit-hash: 3a5d45f
commit-date: 2021-03-09
host: x86_64-unknown-linux-gnu
release: 1.52.0-nightly
LLVM version: 12.0.0
Original report: evcxr/evcxr#156
The text was updated successfully, but these errors were encountered: