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
rust: fix rust cross-compile #89582
rust: fix rust cross-compile #89582
Conversation
reasoning: sjlj (short jump long jump) exception handling makes no sense on x86_64, it's forcably slowing programs down as it produces a constant overhead. On x86_64 we have SEH (Structured Exception Handling) and we should use that. On i686, we do not have SEH, and have to use sjlj with dwarf2. Hence it's now conditional on x86_32
/cc @Ericson2314 |
refs
In the end building sjlj for x86_64 will just cause a forced performance penalty, as well as make building |
I believe |
i686 is 32bit and that’s where this patch leaves sjlj enabled. It only does not force enable sjlj on x86_64. |
Sorry didn't see this yet. I know @cleverca22 has been stuck with this far too long! reading now. |
Right, what I meant is that this change trades one hard-coded config for another, and that there are similar reasons one might want to change the i686 config flags in a similar way. It seems like it'd be useful to be able to use something like |
Fair. It's a bit orthogonal to this change. If you feel like making that change to make the exceptionHandler a parameter, I'm happy to support that. |
reasoning:
sjlj (short jump long jump) exception handling makes no sense on x86_64, it's forcably slowing programs down as it produces a constant overhead. On x86_64 we have SEH (Structured Exception Handling) and we should use that. On i686, we do not have SEH, and have to use sjlj with dwarf2. Hence it's now conditional on x86_32
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)