diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2018-08-10 12:22:28 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2018-08-20 11:37:32 +0200 |
| commit | 34a654caa3640b606316169ebb57e4236e35f57a (patch) | |
| tree | 4d12f73dbd6898024757efd0079905e1a646bd11 /src/bootstrap | |
| parent | 80e27cdd02e86dc1a35b1695049a42a09586320d (diff) | |
| download | rust-34a654caa3640b606316169ebb57e4236e35f57a.tar.gz rust-34a654caa3640b606316169ebb57e4236e35f57a.zip | |
bootstrap: Allow to invoke cargo with the Usage: rustc [OPTIONS] INPUT
Options:
-h, --help Display this message
--cfg SPEC Configure the compilation environment
-L [KIND=]PATH Add a directory to the library search path. The
optional KIND can be one of dependency, crate, native,
framework or all (the default).
-l [KIND=]NAME Link the generated crate(s) to the specified native
library NAME. The optional KIND can be one of static,
dylib, or framework. If omitted, dylib is assumed.
--crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
Comma separated list of types of crates for the
compiler to emit
--crate-name NAME
Specify the name of the crate being built
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
Comma separated list of types of output for the
compiler to emit
--print [crate-name|file-names|sysroot|cfg|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|native-static-libs]
Comma separated list of compiler information to print
on stdout
-g Equivalent to -C debuginfo=2
-O Equivalent to -C opt-level=2
-o FILENAME Write output to <filename>
--out-dir DIR Write output to compiler-chosen filename in <dir>
--explain OPT Provide a detailed explanation of an error message
--test Build a test harness
--target TARGET Target triple for which the code is compiled
-W, --warn OPT Set lint warnings
-A, --allow OPT Set lint allowed
-D, --deny OPT Set lint denied
-F, --forbid OPT Set lint forbidden
--cap-lints LEVEL
Set the most restrictive lint level. More restrictive
lints are capped at this level
-C, --codegen OPT[=VALUE]
Set a codegen option
-V, --version Print version info and exit
-v, --verbose Use verbose output
Additional help:
-C help Print codegen options
-W help Print 'lint' options and default settings
--help -v Print the full set of options rustc accepts command.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 12c1972c220..5c287f25e26 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -827,7 +827,7 @@ impl<'a> Builder<'a> { if let Some(ref error_format) = self.config.rustc_error_format { cargo.env("RUSTC_ERROR_FORMAT", error_format); } - if cmd != "build" && cmd != "check" && want_rustdoc { + if cmd != "build" && cmd != "check" && cmd != "rustc" && want_rustdoc { cargo.env("RUSTDOC_LIBDIR", self.sysroot_libdir(compiler, self.config.build)); } @@ -988,7 +988,7 @@ impl<'a> Builder<'a> { } } - if cmd == "build" + if (cmd == "build" || cmd == "rustc") && mode == Mode::Std && self.config.extended && compiler.is_final_stage(self) |
