Open
Description
Problem
It's very clear in RFC that
- Remaps for
split-debuginfo
only happen in split debuginfo files. - Remaps for
unsplit-debuginfo
only happen in compiled executables or libraries. - Remaps for
split-debuginfo-path
only remap paths pointing to split debuginfo files.
However, on macOS even you have split debuginfo, SO
symbols is still there in the executable.
# Neither `SCOPE=unsplit-debuginfo` or `SCOPE=object` work.
rustc main.rs -g -C -Zunstable-options split-debuginfo=packed \
-Zremap-path-scope="${SCOPE}" \
--remap-path-prefix="${HOME}"=
rm -rf main.dSYM # we don't need this
dsymutil -s main | rg N_SO # You'll see absolute paths to `main.rs`
Although it seems like expected as scope object
is a union of unsplit-debuginfo | split-debuginfo-path | macro
. However, since absolute paths are still embedded in executables, the doc lies on "This ensures all paths in compiled executables or libraries are remapped.
rustc --version --verbose
rustc 1.75.0-nightly (189d6c71f 2023-11-06)
binary: rustc
commit-hash: 189d6c71f3bb6c52113b5639a80839791974fd22
commit-date: 2023-11-06
host: aarch64-apple-darwin
release: 1.75.0-nightly
LLVM version: 17.0.4