Description
Building a no_std project on windows still will generate calls to _chkstk/__chkstk so I'd like to be able to include __rust_probestack instead of having to either re-write my code to not have functions that large OR steal chkstk code from Visual Studio.
This is currently not possible because of the following assumption and code:
compiler-builtins/src/probestack.rs
Lines 45 to 46 in e6fd1b2
This assumption is only true when building with std/msvcrt.
To add this functionality without breaking existing code a feature flag like force-probestack
could be added (please suggest a more suitable name). That would be a pretty minimal code change and also solve the issue:
#![cfg(any(not(windows), feature="force-probestack"))]
The existing x86/x86_64 probestack code currently marked as uefi works fine on Windows, so some changes to the cfg statements will need to be made. I have some working code if a PR would be more desirable.
I suggest the feature flag over just enabling this by default on no_std targets to keep compatibility with existing uses of the crate.
Let me know there is already a way to do this, or if this suggestion is nonsense. Thanks!