-
Couldn't load subscription status.
- Fork 13.9k
unstable-book: Add stubs for environment variables; document some of the important ones #141624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
src/doc/unstable-book/src/compiler-environment-variables/COLORTERM.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # `COLORTERM` | ||
|
|
||
| This environment variable is used by [`-Zterminal-urls`] to detect if URLs are supported by the terminal emulator. | ||
|
|
||
| [`-Zterminal-urls`]: ../compiler-flags/terminal-urls.html |
11 changes: 11 additions & 0 deletions
11
src/doc/unstable-book/src/compiler-environment-variables/QNX_TARGET.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # `QNX_TARGET` | ||
|
|
||
| ---- | ||
|
|
||
| This environment variable is mandatory when linking on `nto-qnx*_iosock` platforms. It is used to determine an `-L` path to pass to the QNX linker. | ||
|
|
||
| You should [set this variable] by running `source qnxsdp-env.sh`. | ||
| See [the QNX docs] for more background information. | ||
|
|
||
| [set this variable]: https://www.qnx.com/developers/docs/qsc/com.qnx.doc.qsc.inst_larg_org/topic/build_server_developer_steps.html | ||
| [the QNX docs]: https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.io_sock/topic/migrate_app.html. | ||
6 changes: 6 additions & 0 deletions
6
src/doc/unstable-book/src/compiler-environment-variables/SDKROOT.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # `SDKROOT` | ||
|
|
||
| This environment variable is used on MacOS targets. | ||
jyn514 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| It is passed through to the linker (either as `-isysroot` or `-syslibroot`) without changes. | ||
jyn514 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Note that this variable is not always respected. When the SDKROOT is clearly wrong (e.g. when the platform of the SDK does not match the `--target` used by rustc), this is ignored and rustc does its own detection. | ||
5 changes: 5 additions & 0 deletions
5
src/doc/unstable-book/src/compiler-environment-variables/TERM.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # `TERM` | ||
|
|
||
| This environment variable is used by [`-Zterminal-urls`] to detect if URLs are supported by the terminal emulator. | ||
|
|
||
| [`-Zterminal-urls`]: ../compiler-flags/terminal-urls.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # `-Z terminal-urls` | ||
|
|
||
| The tracking feature for this issue is [#125586] | ||
|
|
||
| [#125586]: https://github.com/rust-lang/rust/issues/125586 | ||
|
|
||
| --- | ||
|
|
||
| This flag takes either a boolean or the string "auto". | ||
|
|
||
| When enabled, use the OSC 8 hyperlink terminal specification to print hyperlinks in the compiler output. | ||
| Use "auto" to try and autodetect whether the terminal emulator supports hyperlinks. | ||
| Currently, "auto" only enables hyperlinks if `COLORTERM=truecolor` and `TERM=xterm-256color`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # `{name}` | ||
|
|
||
| Environment variables have no tracking issue. This environment variable has no documentation, and therefore is likely internal to the compiler and not meant for general use. | ||
|
|
||
| See [the code][github search] for more information. | ||
|
|
||
| [github search]: https://github.com/search?q=repo%3Arust-lang%2Frust+%22{name}%22+path%3Acompiler&type=code | ||
|
|
||
| ------------------------ |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.