I am compiling my code with -Zbuild-std=core,alloc.
cargo automatically pulls compiler_builtins v0.1.70. I would like to replace compiler_builtins with my customized version, but I couldn't find a way to do that.
Is it possible to provide my own compiler_builtins implementation?
More background: I am compiling Rust code with segmented stack on ARM MCUs. Some __aeabi_* functions defined in compiler_builtins are written in inline assembly. I must patch these functions so that they respect segmented stack.
(We need to build a sysroot, not just a library suited for a single workspace. The biggest technical hurdle I am aware of is that a sysroot contains bothpanic_abort and panic_unwind, to support crates that use either panic strategy. This currently requires passing very specific flags when building these 2 crates, which is only possible via a RUSTC wrapper that adjusts the flags between cargo and rustc.)