Specify --print info=file
syntax in --help
This commit is contained in:
parent
5961e5ba3d
commit
1b46969a11
5 changed files with 16 additions and 17 deletions
|
@ -1560,9 +1560,10 @@ The default is {DEFAULT_EDITION} and the latest stable edition is {LATEST_STABLE
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
static PRINT_KINDS_STRING: LazyLock<String> = LazyLock::new(|| {
|
static PRINT_HELP: LazyLock<String> = LazyLock::new(|| {
|
||||||
format!(
|
format!(
|
||||||
"[{}]",
|
"Compiler information to print on stdout (or to a file)\n\
|
||||||
|
INFO may be one of ({}).",
|
||||||
PRINT_KINDS.iter().map(|(name, _)| format!("{name}")).collect::<Vec<_>>().join("|")
|
PRINT_KINDS.iter().map(|(name, _)| format!("{name}")).collect::<Vec<_>>().join("|")
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
@ -1621,14 +1622,7 @@ pub fn rustc_optgroups() -> Vec<RustcOptGroup> {
|
||||||
"Comma separated list of types of output for the compiler to emit",
|
"Comma separated list of types of output for the compiler to emit",
|
||||||
"[asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]",
|
"[asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]",
|
||||||
),
|
),
|
||||||
opt(
|
opt(Stable, Multi, "", "print", &PRINT_HELP, "INFO[=FILE]"),
|
||||||
Stable,
|
|
||||||
Multi,
|
|
||||||
"",
|
|
||||||
"print",
|
|
||||||
"Compiler information to print on stdout",
|
|
||||||
&PRINT_KINDS_STRING,
|
|
||||||
),
|
|
||||||
opt(Stable, FlagMulti, "g", "", "Equivalent to -C debuginfo=2", ""),
|
opt(Stable, FlagMulti, "g", "", "Equivalent to -C debuginfo=2", ""),
|
||||||
opt(Stable, FlagMulti, "O", "", "Equivalent to -C opt-level=3", ""),
|
opt(Stable, FlagMulti, "O", "", "Equivalent to -C opt-level=3", ""),
|
||||||
opt(Stable, Opt, "o", "", "Write output to <filename>", "FILENAME"),
|
opt(Stable, Opt, "o", "", "Write output to <filename>", "FILENAME"),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@@ -51,10 +51,27 @@
|
@@ -53,10 +53,27 @@
|
||||||
Set a codegen option
|
Set a codegen option
|
||||||
-V, --version Print version info and exit
|
-V, --version Print version info and exit
|
||||||
-v, --verbose Use verbose output
|
-v, --verbose Use verbose output
|
||||||
|
|
|
@ -29,8 +29,10 @@ Options:
|
||||||
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
|
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
|
||||||
Comma separated list of types of output for the
|
Comma separated list of types of output for the
|
||||||
compiler to emit
|
compiler to emit
|
||||||
--print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
|
--print INFO[=FILE]
|
||||||
Compiler information to print on stdout
|
Compiler information to print on stdout (or to a file)
|
||||||
|
INFO may be one of
|
||||||
|
(all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
|
||||||
-g Equivalent to -C debuginfo=2
|
-g Equivalent to -C debuginfo=2
|
||||||
-O Equivalent to -C opt-level=3
|
-O Equivalent to -C opt-level=3
|
||||||
-o FILENAME Write output to <filename>
|
-o FILENAME Write output to <filename>
|
||||||
|
|
|
@ -29,8 +29,10 @@ Options:
|
||||||
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
|
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
|
||||||
Comma separated list of types of output for the
|
Comma separated list of types of output for the
|
||||||
compiler to emit
|
compiler to emit
|
||||||
--print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
|
--print INFO[=FILE]
|
||||||
Compiler information to print on stdout
|
Compiler information to print on stdout (or to a file)
|
||||||
|
INFO may be one of
|
||||||
|
(all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
|
||||||
-g Equivalent to -C debuginfo=2
|
-g Equivalent to -C debuginfo=2
|
||||||
-O Equivalent to -C opt-level=3
|
-O Equivalent to -C opt-level=3
|
||||||
-o FILENAME Write output to <filename>
|
-o FILENAME Write output to <filename>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
error: Argument to option 'print' missing
|
error: Argument to option 'print' missing
|
||||||
Usage:
|
Usage:
|
||||||
--print [all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models]
|
--print INFO[=FILE] Compiler information to print on stdout (or to a file)
|
||||||
Compiler information to print on stdout
|
INFO may be one of
|
||||||
|
(all-target-specs-json|calling-conventions|cfg|check-cfg|code-models|crate-name|crate-root-lint-levels|deployment-target|file-names|host-tuple|link-args|native-static-libs|relocation-models|split-debuginfo|stack-protector-strategies|supported-crate-types|sysroot|target-cpus|target-features|target-libdir|target-list|target-spec-json|tls-models).
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue