Skip to content

poor diagnostic for unsupported -fuse-ld=lld flag #140964

@Mark-Simulacrum

Description

@Mark-Simulacrum

On older platforms (e.g., Amazon Linux 2 is where I encountered this), the current implementation of LLD-by-default in rustc leads to a tracing::warn! log line: https://github.com/rust-lang/rust/blob/dcecb99176edf2eec51613730937d21cdd5c8f6e/compiler/rustc_codegen_ssa/src/back/link.rs#L771C24-L771C54

The linker driver does not support `-fuse-ld=lld`. Retrying without it

This is at minimum a diagnostics bug, but I'm not sure the warning makes sense -- if we're not able to use LLD and have a well-supported fallback path, as long as the user isn't explicitly requesting LLD it seems plausible that a silent fallback is better than complaining noisily (and still falling back)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-linkersArea: linkers... you gotta love linkersC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions