Repository navigation
Conversation
Add `--remap-path-prefix OLD=NEW` option to replace source path prefixes recorded in SDK binaries. This supports reproducible builds while preserving debug information. Signed-off-by: r4v3n6101 <raven6107@gmail.com>
There was a problem hiding this comment.
Not reviewing the impl, but I think this should be done sensibly (reproducible) by default. Your example of the two remap path prefixes, I think we should just default to having those always (and not having arguments since there's basically no need). We're already passing the needed paths around so we don't need to do extra.
The other thing I'd do is to add this to the build system properly, rather than hacking it into build_sdk.py for injecting. (There's presumably a standard Rust way to do this as well rather than Rustflags).
The other thing I'd like to add is just some basic instructions or link to the documentation about how to make GCC know how to read the source code when this is used, as otherwise you don't get source code (whereas if you build without this option then you do).
Started here: NixOS/nixpkgs#572133 (comment)
Support reproducible builds whilst preserving debug information. Provides
--remap-path-prefix OLD=NEWoption to replace source path prefixes recorded in SDK binaries.