Cross compile libcore

Hi

Rust beginner here.

I am trying create a custom target for RISC-V architecture, I would like to build the core library and share it as precompiled library. I was successful in compiling the core library for custom target using -Z build-std feature.

Next if I share this as precompiled library, how do I make rustc use this version of the core library?

Any hint much appreciated. Thanks

Have you tried --sysroot?

https://doc.rust-lang.org/rustc/command-line-arguments.html#--sysroot-override-the-system-root

@Sky9 Where do I set the --sysroot, as a link-arg?