Closed jorolf closed 5 months ago
I like the spirit of this PR as the current code has been pretty much a "oh damn, this other target doesn't work, let me get some tape" kind of situation,
It also makes me think that we should have some dedicated type for the target triples. So instead of doing target.starts_with("architecture")
we were able to do things like target.architecture == "architecture"
or something.
Maybe using https://docs.rs/target-lexicon would be a good idea. It is an extra dependency, but it doesn't have other dependencies and it is well maintained IMHO.
This change simplifies/generalizes the rust to clang target conversion and allows more targets to work. (e.g.
riscv32i-unknown-none-elf
)Let me know if I'm missing something!