You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On *-windows-msvc targets, rustc_compile_action in rust/private/rustc.bzl declares the .pdb of bin and cdylib crates only when the strip level is none. rustc ignores -Cstrip on MSVC and always links with /DEBUG (rust-lang/rust#115120), so the PDB is written in every compilation mode.
Under -c opt (strip level debuginfo by default), the PDB is an undeclared output and the pdb_file output group is missing.
The filegroup is empty, while bazel-bin/test/unit/debug_info/myrustbin.pdb is on disk next to the .exe.
Proposed fix: declare the PDB for every MSVC bin/cdylib whatever the strip level. No public interface change. PR to follow with an analysis test that runs on Linux through a mock MSVC toolchain.
Activity
Declare the MSVC PDB at every strip level