Allow to run custom commands in cross containers to be able to use strip after the build #1266
Copy link
Copy link
Closed
Labels
Description
Activity
I will be happy to implement it if the team agrees that is a good use case and we can include it in cross.
I think this is a duplicate of #716
I think it's in the same area as #716 but not the same thing. This one is also much easier to implement.
I think this would be good to have also for debugging issues in a cross container
Implementing this should be pretty easy, it'd have to be implemented as a
cross-utilcommand and would just have to modifydocker::runto allow for an interpretive sessionimplemented in #1280 🎉
Checklist
Describe your request
I think will be really useful to have a cross subcommand to run a custom command in the docker container. It could be something like
cross runsh --target <target> "shell commands"Describe why this would be a good inclusion for
crossIn my use case, I want to strip the binaries and I need the target strip to do it properly.
I know that you can configure striping in
Cargo.tomlbut in Apple targets don't work, it shows the next error (this should be solved in cargo anyway probably is using the host strip to strip the target).If I we have the option to run custom commands in cross I could run
cross runsh --target <target> "<target>-strip path/to/my/bin". I know that I can use the docker container directly but is handy to have cross setting up the volumes and all needed environment.Also I can see how others can beneficiate from this if they want to run other target specific tools like objdump or nm in their binaries/libs.