Skip to content

How to handle pre-built linkers? #47

@ehuss

Description

@ehuss

Some pre-built standard library targets include a copy of rust-lld or gcc to assist with linking. We should probably figure out if these should be considered.

I'm not sure how this should be approached to supporting these targets. Some possible ideas:

  • Ship rust-lld as a rustup component.
  • Force the user to install the appropriate linker themselves (other targets assume some kind of linker exists).

I'm actually not sure what is special about rust-lld (does it deviate from stock lld?). It may be easier for the user to install the real lld, though there would need to be some way for cargo and rustc to know what to use, and provide good error messages if it is not installed.

There is some more detail in #30 (comment).

The most unusual target is x86_64-pc-windows-gnu which ships gcc. I always find getting a working version of mingw a chore.

The following targets appear to want to use rust-lld:

  • aarch64-unknown-none
  • armebv7r-none-eabi
  • armebv7r-none-eabihf
  • armv7r-none-eabi
  • armv7r-none-eabihf
  • fuchsia*
  • i686-unknown-uefi
  • riscv32i-unknown-none-elf
  • riscv32imac-unknown-none-elf
  • riscv32imc-unknown-none-elf
  • riscv64gc-unknown-none-elf
  • riscv64imac-unknown-none-elf
  • thumb*
  • wasm32*
  • x86-64-unknown-uefi

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-needs-designStatus: needs design workplan before stabilizationThis needs a plan for how to address before stabilization, but does not need to be implemented.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions