Skip to content

Add documentation for RUSTC_EMIT #1635

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/building/bootstrapping.md
Original file line number Diff line number Diff line change
@@ -365,6 +365,19 @@ recompiling all dependencies.
`CARGOFLAGS` will pass arguments to cargo itself (e.g. `--timings`). `CARGOFLAGS_BOOTSTRAP` and
`CARGOFLAGS_NOT_BOOTSTRAP` work analogously to `RUSTFLAGS_BOOTSTRAP`.

`RUSTC_EMIT` will cause `bootstrap` to pass `--emit` arguments on to `rustc`.
You can specify which `--emit` formats are used with a comma separated list prefixed with
a crate name and `=`, for example: `rustc_arena=llvm-ir,asm`.
You can also substitute `*` for the crate name to apply it to all crates.
You can combine multiple such specifiers by seperating them with semi-colons like
`rustc_arena=llvm-ir,asm;rustc_span=asm;*=llvm-bc`.
Currently, `rustc` supports `asm`, `llvm-bc`, `llvm-ir`,
`obj`, `metadata`, `link`, `dep-info`, and `mir` as `--emit` formats.
The emitted files will be stored inside the `emit`
directory in the target-specific build directory.
`RUSTC_EMIT` will not cause `bootstrap` to rebuild any crates, so you may need to modify
one of the source files of the crates you're interested in.

`--test-args` will pass arguments through to the test runner. For `tests/ui`, this is
compiletest; for unit tests and doctests this is the `libtest` runner. Most test runner accept
`--help`, which you can use to find out the options accepted by the runner.