rustc-dev-guide: Mention --extern modifiers for aux-crate directive
This commit is contained in:
parent
9f6cd6defb
commit
9aaa581fe8
2 changed files with 11 additions and 9 deletions
|
|
@ -655,7 +655,9 @@ to link to the extern crate to make the crate be available as an extern prelude.
|
|||
That allows you to specify the additional syntax of the `--extern` flag, such as
|
||||
renaming a dependency. For example, `//@ aux-crate:foo=bar.rs` will compile
|
||||
`auxiliary/bar.rs` and make it available under then name `foo` within the test.
|
||||
This is similar to how Cargo does dependency renaming.
|
||||
This is similar to how Cargo does dependency renaming. It is also possible to
|
||||
specify [`--extern` modifiers](https://github.com/rust-lang/rust/issues/98405).
|
||||
For example, `//@ aux-crate:noprelude:foo=bar.rs`.
|
||||
|
||||
`aux-bin` is similar to `aux-build` but will build a binary instead of a
|
||||
library. The binary will be available in `auxiliary/bin` relative to the working
|
||||
|
|
|
|||
|
|
@ -53,14 +53,14 @@ Directives can generally be found by browsing the
|
|||
|
||||
See [Building auxiliary crates](compiletest.html#building-auxiliary-crates)
|
||||
|
||||
| Directive | Explanation | Supported test suites | Possible values |
|
||||
|-----------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------|-----------------------------------------------|
|
||||
| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
|
||||
| `aux-build` | Build a separate crate from the named source file | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
|
||||
| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make`/`run-make-cargo` | `<extern_prelude_name>=<path/to/aux/file.rs>` |
|
||||
| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file |
|
||||
| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make`/`run-make-cargo` | Path to auxiliary proc-macro `.rs` file |
|
||||
| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make`/`run-make-cargo` | N/A |
|
||||
| Directive | Explanation | Supported test suites | Possible values |
|
||||
|-----------------------|-------------------------------------------------------------------------------------------------------|----------------------------------------|--------------------------------------------------------------------|
|
||||
| `aux-bin` | Build a aux binary, made available in `auxiliary/bin` relative to test directory | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
|
||||
| `aux-build` | Build a separate crate from the named source file | All except `run-make`/`run-make-cargo` | Path to auxiliary `.rs` file |
|
||||
| `aux-crate` | Like `aux-build` but makes available as extern prelude | All except `run-make`/`run-make-cargo` | `[<extern_modifiers>:]<extern_prelude_name>=<path/to/aux/file.rs>` |
|
||||
| `aux-codegen-backend` | Similar to `aux-build` but pass the compiled dylib to `-Zcodegen-backend` when building the main file | `ui-fulldeps` | Path to codegen backend file |
|
||||
| `proc-macro` | Similar to `aux-build`, but for aux forces host and don't use `-Cprefer-dynamic`[^pm]. | All except `run-make`/`run-make-cargo` | Path to auxiliary proc-macro `.rs` file |
|
||||
| `build-aux-docs` | Build docs for auxiliaries as well. Note that this only works with `aux-build`, not `aux-crate`. | All except `run-make`/`run-make-cargo` | N/A |
|
||||
|
||||
[^pm]: please see the [Auxiliary proc-macro section](compiletest.html#auxiliary-proc-macro) in the compiletest chapter for specifics.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue