Skip to content

build_sdk: add source path remapping - #625

Open
r4v3n6101 wants to merge 1 commit into
seL4:mainfrom
r4v3n6101:remap-path-prefix
Open

r4v3n6101 wants to merge 1 commit into
seL4:mainfrom
r4v3n6101:remap-path-prefix

Conversation

@r4v3n6101

Copy link
Copy Markdown
Contributor

Started here: NixOS/nixpkgs#572133 (comment)

Support reproducible builds whilst preserving debug information. Provides --remap-path-prefix OLD=NEW option to replace source path prefixes recorded in SDK binaries.

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>

@midnightveil midnightveil left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants