Closed Ericson2314 closed 1 year ago
Hi, can you describe how this could be done? I'm not sure in what field this could be stored.
Otherwise, maybe we can switch to using https://github.com/rust-embedded/cargo-binutils. Does it invoke the correct objcopy
on your platform ?
I saw Cargo binutils, it looks like it is just looking up tools from a sysroot, which isn't very self contained. I will try it but I doubt it wil work for me.
Hi, can you describe how this could be done? I'm not sure in what field this could be stored.
I was thinking
[target.<triple>]
linker = "…" # linker to use
from https://doc.rust-lang.org/cargo/reference/config.html#targettriplelinker. I thought one could but other tools there but perhaps not.
However if CARGO_TARGET_<triple>_LINKER
is equivalent that to that, nothing stops us to using CARGO_TARGET_<triple>_OBJCOPY
and CARGO_TARGET_<triple>_SIZE
separate from any Cargo code :). Just might be confusing if the config file equivalent didn't work.
I did https://github.com/obsidiansystems/cargo-ledger/commit/bf4610480ef65844ffc173fd54c4aba2ca9bcec1 to unblock myself, but this kinda of ugly. Maybe there is way to get the tools from
.cargo/config
instead?