Open
Description
Compiling any code with the standard library as shared.
env RUSTFLAGS="-C prefer-dynamic" cargo build -v --release
strip -s target/release/hello
I expected to see this happen:
the stripped version must have a smaller executable and have all symbols removed
Instead, this happened:
the size of the executable increased to 2.1 M and all symbols were there
rustc --version --verbose
:
rustc 1.70.0 (90c541806 2023-05-31)
binary: rustc
commit-hash: 90c541806f23a127002de5b4038be731ba1458ca
commit-date: 2023-05-31
host: x86_64-unknown-linux-gnu
release: 1.70.0
LLVM version: 16.0.2
compiling as static or with musl works correctly
Worked as expected in all previous releases
I suspect LLVM 16 is the cause but cannot pinpoint the cause really.
tested on:
- Red Hat Enterprise Linux release 8.8 (Ootpa)
- CentOS Linux release 7.9.2009 (Core)
- Rocky Linux 8.8