diff options
| author | Doug Goldstein <cardoe@cardoe.com> | 2016-12-01 16:26:47 -0600 |
|---|---|---|
| committer | Doug Goldstein <cardoe@cardoe.com> | 2016-12-01 16:59:09 -0600 |
| commit | 8285ab5c99db166e2137fb4b92fedd03b56acaa0 (patch) | |
| tree | 2fe8d8d6bac3b2f23683a67846e5a5f1e8a32d06 /src | |
| parent | 908dba0c9477b7dd022a236cb1514ddfca9369f2 (diff) | |
| download | rust-8285ab5c99db166e2137fb4b92fedd03b56acaa0.tar.gz rust-8285ab5c99db166e2137fb4b92fedd03b56acaa0.zip | |
convert --print options to a vector
To allow manipulation of the options that appear in --print, convert it to a vector. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/session/config.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 26dafed7019..9dd341c7674 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1138,6 +1138,10 @@ mod opt { /// including metadata for each option, such as whether the option is /// part of the stable long-term interface for rustc. pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> { + let mut print_opts = vec!["crate-name", "file-names", "sysroot", "cfg", + "target-list", "target-cpus", "target-features", + "relocation-models", "code-models"]; + vec![ opt::flag_s("h", "help", "Display this message"), opt::multi_s("", "cfg", "Configure the compilation environment", "SPEC"), @@ -1157,9 +1161,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> { the compiler to emit", "[asm|llvm-bc|llvm-ir|obj|link|dep-info]"), opt::multi_s("", "print", "Comma separated list of compiler information to \ - print on stdout", - "[crate-name|file-names|sysroot|cfg|target-list|target-cpus|\ - target-features|relocation-models|code-models]"), + print on stdout", &print_opts.join("|")), opt::flagmulti_s("g", "", "Equivalent to -C debuginfo=2"), opt::flagmulti_s("O", "", "Equivalent to -C opt-level=2"), opt::opt_s("o", "", "Write output to <filename>", "FILENAME"), |
