Skip to content

Duplicate output of "-r" argument when invoking the linker with Clang #82010

Closed
@gbreynoo

Description

@gbreynoo

When requesting -r output multiple Clang drivers will output -r twice in the constructed commandline for the linker invocation. The cause looks to be that they explicitly add options::OPT_r within their ::Linker::ConstructJob() function. The argument also has the option flag LinkerInput in Options.td so it is also added when AddLinkerInputs() is called. Only -r looks to be duplicated like this so there is no difference in linker behavior.

Below is a list of drivers that I have seen the issue, I've not checked for more:

  • darwin
  • dragonfly
  • freebsd
  • openbsd
  • ps4 and ps5

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:driver'clang' and 'clang++' user-facing binaries. Not 'clang-cl'

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions