Open
Description
Unresolved questions
1. How to expose this feature?
Maybe a command line interface that looks like this:
flip-link $actual_linker_arguments --linker=arm-none-eabi-gcc
Where --linker
may appear in any position. flip-link
will use arm-none-eabi-gcc
as the linker.
This way the user species flip-link
in their config.toml like this:
# .cargo/config.toml
rustflags = [
"-C", "linker=flip-link",
"-C", "link-arg=--linker=arm-none-eabi-gcc", # <- may appear in any position
"-C", "linker-flavor=gcc", # <- not passed to the linker
# ..
]
2. How to determine the linker flavor?
flip-link
passes extra linker arguments to the underlying linker.
It currently assumes the linker flavor is "ld". If you want to use gcc
those extra linker arguments need to be prefixed by -Wl,
(iirc), i.e. -Wl,--defsym=something
instead of just --defsym=something
.
flip-link
will not see the -C linker-flavor
passed to rustc
. Should the user also pass a --linker-flavor
argument to flip-link
?
Activity