Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0c9aeba
Remove no-prefer-dynamic from valgrind tests
Mark-Simulacrum Sep 1, 2019
991f436
Fix regex replacement in theme detection
GuillaumeGomez Sep 2, 2019
4ffb429
run-pass tests shouldn't have unused contents
Mark-Simulacrum Sep 1, 2019
09a442d
Update test stderr with results of enabling unused lints
Mark-Simulacrum Sep 1, 2019
c86ea34
Ensure all warnings are emitted even on warnings=warn
Mark-Simulacrum Sep 2, 2019
fda251b
Rename --warnings=allow to --warnings=warn
Mark-Simulacrum Sep 2, 2019
485697b
Better way of conditioning the sanitizer builds
infinity0 Sep 5, 2019
27b0946
Thread in-tree information through Mode
Mark-Simulacrum Sep 4, 2019
c6f868f
Move warnings out of rustc wrapper
Mark-Simulacrum Sep 4, 2019
159d249
annotate-snippet emitter: Deal with multispans from macros, too
phansch Sep 5, 2019
022d9c8
Fixed grammar/style in error messages and reblessed tests.
alexreg Sep 1, 2019
0ca645a
annotate-snippet emitter: Update issue number
phansch Sep 6, 2019
ba7d1b8
it's more pythonic to use 'is not None' in python files
Sep 6, 2019
72eca54
Rollup merge of #64067 - Mark-Simulacrum:valgrind-dyn, r=alexcrichton
Centril Sep 6, 2019
65527e2
Rollup merge of #64078 - Mark-Simulacrum:compiletest-lint-unused, r=p…
Centril Sep 6, 2019
71d04f9
Rollup merge of #64096 - GuillaumeGomez:theme-regex-fix, r=Mark-Simul…
Centril Sep 6, 2019
a54ba42
Rollup merge of #64098 - Mark-Simulacrum:always-warn, r=alexcrichton
Centril Sep 6, 2019
64b2e4a
Rollup merge of #64166 - infinity0:master, r=alexcrichton
Centril Sep 6, 2019
abd777f
Rollup merge of #64189 - phansch:add_macros_support, r=estebank
Centril Sep 6, 2019
21ab7bc
Rollup merge of #64202 - alexreg:rush-pr-1, r=Centril
Centril Sep 6, 2019
f9aa5d6
Rollup merge of #64206 - phansch:update_issue_number, r=varkor
Centril Sep 6, 2019
4ac73a1
Rollup merge of #64208 - guanqun:py-is-not-none, r=matklad
Centril Sep 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move warnings out of rustc wrapper
  • Loading branch information
Mark-Simulacrum committed Sep 5, 2019
commit c6f868f296cafddd6ed424f08b981e7a3e600e84
16 changes: 3 additions & 13 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,9 @@ fn main() {
cmd.arg(format!("-Cdebuginfo={}", debuginfo_level));
}

if env::var_os("RUSTC_EXTERNAL_TOOL").is_none() {
// When extending this list, add the new lints to the RUSTFLAGS of the
// build_bootstrap function of src/bootstrap/bootstrap.py as well as
// some code doesn't go through this `rustc` wrapper.
cmd.arg("-Wrust_2018_idioms");
cmd.arg("-Wunused_lifetimes");
if use_internal_lints(crate_name) {
cmd.arg("-Zunstable-options");
cmd.arg("-Wrustc::internal");
}
if env::var_os("RUSTC_DENY_WARNINGS").is_some() {
cmd.arg("-Dwarnings");
}
if use_internal_lints(crate_name) {
cmd.arg("-Zunstable-options");
cmd.arg("-Wrustc::internal");
}

if let Some(target) = target {
Expand Down
26 changes: 22 additions & 4 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,28 @@ impl<'a> Builder<'a> {
extra_args.push_str("-Zforce-unstable-if-unmarked");
}

match mode {
Mode::ToolStd { in_tree: true } |
Mode::ToolRustc { in_tree: true } |
Mode::ToolBootstrap { in_tree: true } |
Mode::Std |
Mode::Rustc |
Mode::Codegen => {
// When extending this list, add the new lints to the RUSTFLAGS of the
// build_bootstrap function of src/bootstrap/bootstrap.py as well as
// some code doesn't go through this `rustc` wrapper.
extra_args.push_str(" -Wrust_2018_idioms");
extra_args.push_str(" -Wunused_lifetimes");
}
Mode::ToolStd { in_tree: false } |
Mode::ToolRustc { in_tree: false } |
Mode::ToolBootstrap { in_tree: false } => {}
}

if self.config.deny_warnings {
extra_args.push_str(" -Dwarnings");
}

if !extra_args.is_empty() {
cargo.env(
"RUSTFLAGS",
Expand Down Expand Up @@ -1038,10 +1060,6 @@ impl<'a> Builder<'a> {

cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());

if self.config.deny_warnings {
cargo.env("RUSTC_DENY_WARNINGS", "1");
}

// Throughout the build Cargo can execute a number of build scripts
// compiling C/C++ code and we need to pass compilers, archivers, flags, etc
// obtained previously to those build scripts.
Expand Down