Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup binaries should be compiled with remap-debuginfo = true #2821

Closed
blixt opened this issue Jul 6, 2021 · 2 comments
Closed

rustup binaries should be compiled with remap-debuginfo = true #2821

blixt opened this issue Jul 6, 2021 · 2 comments

Comments

@blixt
Copy link

blixt commented Jul 6, 2021

Describe the problem you are trying to solve

When compiling a binary with the following RUSTFLAGS environment variable:

RUSTFLAGS='--remap-path-prefix=/Users/blixt/src/my-project=. --remap-path-prefix=/Users/blixt=~'

it successfully removes all references to my local computer's directory structure in the debug information within the compiled output for Cargo dependencies and the project's binary.

However, some references to my computer's directory remains in the binary build product, and that is anything already compiled by rustup, for example:

/Users/blixt/.rustup/toolchains/1.52.0-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/alloc/layout.rs

This makes the build output dependent on the folder structure of the computer it's compiled on, which makes it a lot harder to create reproducible builds across developers' machines (in my case, the build output is turned into WASM, and these strings create differences in the build output).

Describe the solution you'd like

If rustup compiled using the configuration option remap-debuginfo = true or the flag --remap-path-prefix=FROM=TO then it would be easier to create reproducible builds.

Notes

@rbtcollins
Copy link
Contributor

Rustup doesn't build those files at all: they are downloaded from the rust project builds; this bug belongs on rustc.

@kinnison
Copy link
Contributor

I believe this is related to rust-lang/rust#75362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants