Skip to content

Commit

Permalink
Auto merge of #83800 - xobs:impl-16351-nightly, r=nagisa
Browse files Browse the repository at this point in the history
Add default search path to `Target::search()`

The function `Target::search()` accepts a target triple and returns a `Target` struct defining the requested target.

There is a `// FIXME 16351: add a sane default search path?` comment that indicates it is desirable to include some sort of default. This was raised in rust-lang/rust#16351 which was closed without any resolution.

rust-lang/rust#31117 was proposed, however that has platform-specific logic that is unsuitable for systems without `/etc/`.

This patch implements the suggestion raised in rust-lang/rust#16351 (comment) where a `target.json` file may be placed in `$(rustc --print sysroot)/lib/rustlib/<target-triple>/target.json`. This allows shipping a toolchain distribution as a single file that gets extracted to the sysroot.
  • Loading branch information
bors committed May 9, 2021
2 parents 7c2f768 + a076035 commit 364de72
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 364de72

Please sign in to comment.