rust/tests
Matthias Krüger b1d1e99c22
Rollup merge of #113780 - dtolnay:printkindpath, r=b-naber
Support `--print KIND=PATH` command line syntax

As is already done for `--emit KIND=PATH` and `-L KIND=PATH`.

In the discussion of #110785, it was pointed out that `--print KIND=PATH` is nicer than trying to apply the single global `-o` path to `--print`'s output, because in general there can be multiple print requests within a single rustc invocation, and anyway `-o` would already be used for a different meaning in the case of `link-args` and `native-static-libs`.

I am interested in using `--print cfg=PATH` in Buck2. Currently Buck2 works around the lack of support for `--print KIND=PATH` by [indirecting through a Python wrapper script](d43cf3a51a/prelude/rust/tools/get_rustc_cfg.py) to redirect rustc's stdout into the location dictated by the build system.

From skimming Cargo's usages of `--print`, it definitely seems like it would benefit from `--print KIND=PATH` too. Currently it is working around the lack of this by inserting `--crate-name=___ --print=crate-name` so that it can look for a line containing `___` as a delimiter between the 2 other `--print` informations it actually cares about. This is commented as a "HACK" and "abuse". 31eda6f7c3/src/cargo/core/compiler/build_context/target_info.rs (L242) (FYI `@weihanglo` as you dealt with this recently in https://github.com/rust-lang/cargo/pull/11633.)

Mentioning reviewers active in #110785: `@fee1-dead` `@jyn514` `@bjorn3`
2023-07-21 06:52:28 +02:00
..
assembly test-various: run codegen and assembly tests 2023-07-02 02:22:22 +02:00
auxiliary
codegen Get !nonnull metadata consistently in slice iterators, without needing assumes 2023-07-20 11:33:49 -07:00
codegen-units
debuginfo Update natvis to match full type names for Arc, Rc, Weak, etc 2023-07-17 15:51:46 -04:00
incremental Querify unused trait check. 2023-07-16 21:51:00 +00:00
mir-opt Auto merge of #113344 - scottmcm:alt-slice-zst-handing, r=the8472 2023-07-21 00:11:41 +00:00
pretty
run-coverage refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
run-coverage-rustdoc Re-bless the newly-migrated tests 2023-06-28 11:09:19 +10:00
run-make Rollup merge of #113780 - dtolnay:printkindpath, r=b-naber 2023-07-21 06:52:28 +02:00
run-make-fulldeps On nightly, dump ICE backtraces to disk 2023-07-19 14:10:07 +00:00
run-pass-valgrind
rustdoc Rollup merge of #110765 - wackbyte:fix-defaultness-position, r=fmease,GuillaumeGomez 2023-07-20 17:19:32 +02:00
rustdoc-gui Update rustdoc GUI tests 2023-07-18 14:34:24 +02:00
rustdoc-js Auto merge of #112233 - notriddle:notriddle/search-unify, r=GuillaumeGomez 2023-06-15 03:04:46 +00:00
rustdoc-js-std Auto merge of #108537 - GuillaumeGomez:rustdoc-search-whitespace-as-separator, r=notriddle 2023-07-02 18:49:29 +00:00
rustdoc-json Auto merge of #113574 - GuillaumeGomez:rustdoc-json-strip-hidden-impl, r=aDotInTheVoid,notriddle 2023-07-18 02:47:03 +00:00
rustdoc-ui Auto merge of #113622 - RickleAndMortimer:issue-113184-fix, r=oli-obk 2023-07-20 03:18:41 +00:00
ui Rollup merge of #113780 - dtolnay:printkindpath, r=b-naber 2023-07-21 06:52:28 +02:00
ui-fulldeps Rollup merge of #113373 - jyn514:download-rustc-fixes, r=albertlarsan68 2023-07-11 21:00:27 -07:00
COMPILER_TESTS.md