I have a cargo project where I can configure successfully that all crates should be dumped as bitcode (rustflags = ["--emit=llvm-bc"]
). That way, I get a bunch of bitcode files in the deps
folder of my cargo output.
I'm using no_std
, however, I am also going to need alloc::fmt
. Unfortunately that bitcode does not get dumped to deps
. Is there a way to obtain it somehow? I know I could poke into some .rlib
files that are stashed in the sysroot, but is there a less hacky way to do this?
(Ultimately, I want to link all the bitcode files using llvm-link
.)