Skip to content

Support target json file extension in various cases (json, JSON) #127387

@boozook

Description

@boozook

Currently user's target json file can have only json form, but for file that ends with `.JSON' rustc returns error:

error: Error loading target specification: Could not find specification for target "my-target.JSON". Run `rustc --print target-list` for a list of built-in targets

Where it useful?

Old OS and old file-systems such as FAT (that stored the files names and extensions as all caps).

Meta

rustc --version --verbose:

rustc 1.81.0-nightly (ba1d7f4a0 2024-06-29)
binary: rustc
commit-hash: ba1d7f4a083e6402679105115ded645512a7aea8
commit-date: 2024-06-29
host: aarch64-apple-darwin
release: 1.81.0-nightly
LLVM version: 18.1.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-specsArea: Compile-target specificationsC-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