Skip to content

--target should ignore the machine part of the triplet in most cases #33147

Closed as not planned
@glandium

Description

@glandium

Currently, rustc accepts a limited set of --target values. Those match some of the values one can get out of the typical config.guess, but for most platforms, the machine/manufacturer part of the target triplet should be ignored, or allowed to be omitted. (the output of config-guess is of the form CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM or CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM)

For example, the linux x86_64 target for rustc is --target=x86_64-unknown-linux-gnu.
Some time ago, config.guess would have returned that. Nowadays, it returns x86_64-pc-linux-gnu.
clang accepts both, as well as the shorter form: --target=x86_64-linux-gnu (in fact, it's very lax, --target=x86_64-foo works too).
A typical cross GCC toolchain will come as x86_64-linux-gnu-gcc too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: Command-line interface (CLI) to the compilerA-targetsArea: Concerning the implications of different compiler targetsC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-dev-toolsRelevant to the dev-tools subteam, 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