diff options
| author | Jieyou Xu <jieyouxu@outlook.com> | 2025-03-18 13:37:36 +0800 |
|---|---|---|
| committer | Jieyou Xu <jieyouxu@outlook.com> | 2025-03-23 19:08:55 +0800 |
| commit | 13530afc08909a44874dc1e8667747fddb48e3c7 (patch) | |
| tree | fd877cfbc941a5e4a43471941d61c24afe670aad | |
| parent | 0e7dbab1fc4a2cfc63bac4f5c4d283d2504f1547 (diff) | |
| download | rust-13530afc08909a44874dc1e8667747fddb48e3c7.tar.gz rust-13530afc08909a44874dc1e8667747fddb48e3c7.zip | |
Document `supported-crate-types` print request in unstable book
| -rw-r--r-- | src/doc/unstable-book/src/compiler-flags/print-supported-crate-types.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/doc/unstable-book/src/compiler-flags/print-supported-crate-types.md b/src/doc/unstable-book/src/compiler-flags/print-supported-crate-types.md new file mode 100644 index 00000000000..f285d6e7175 --- /dev/null +++ b/src/doc/unstable-book/src/compiler-flags/print-supported-crate-types.md @@ -0,0 +1,27 @@ +# `print=supported-crate-types` + +The tracking issue for this feature is: [#138640](https://github.com/rust-lang/rust/issues/138640). + +------------------------ + +This option of the `--print` flag produces a list of crate types (delimited by newlines) supported for the given target. + +The crate type strings correspond to the values accepted by the `--crate-type` flag. + +Intended to be used like this: + +```bash +rustc --print=supported-crate-types -Zunstable-options --target=x86_64-unknown-linux-gnu +``` + +Example output for `x86_64-unknown-linux-gnu`: + +```text +bin +cdylib +dylib +lib +proc-macro +rlib +staticlib +``` |
