From 3070124e6ab8edcc1be5ac02a57d7cea05e10427 Mon Sep 17 00:00:00 2001 From: Waffle Maybe Date: Sat, 27 Apr 2024 16:30:40 +0200 Subject: [PATCH] Set `deny-warnings` for compiler/library/tools profiles to `false` --- bootstrap.example.toml | 15 ++++++++++++--- src/bootstrap/defaults/bootstrap.compiler.toml | 2 ++ src/bootstrap/defaults/bootstrap.dist.toml | 2 ++ src/bootstrap/defaults/bootstrap.library.toml | 2 ++ src/bootstrap/defaults/bootstrap.tools.toml | 2 ++ src/bootstrap/src/utils/change_tracker.rs | 5 +++++ 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/bootstrap.example.toml b/bootstrap.example.toml index 25e2ca5948bfb..ea19cd8a73937 100644 --- a/bootstrap.example.toml +++ b/bootstrap.example.toml @@ -826,9 +826,18 @@ # in the sysroot. It is required for running nvptx tests. #rust.llvm-bitcode-linker = false -# Whether to deny warnings in crates. Set to `false` to avoid -# error: warnings are denied by `build.warnings` configuration -#rust.deny-warnings = true +# Whether to deny warnings in crates. +# +# Set to `true` to fail the build if there are warnings in crates, +# to not accidentally miss warnings in long build output. +# +# Set to `false` to avoid "error: warnings are denied by `build.warnings` configuration" +# and have easier time iterating on your changes. +# +# This is set to `true` by default for the `dist` profile and to `false` otherwise. +# +# Note that CI denies warnings. +#rust.deny-warnings = false # Print backtrace on internal compiler errors during bootstrap #rust.backtrace-on-ice = false diff --git a/src/bootstrap/defaults/bootstrap.compiler.toml b/src/bootstrap/defaults/bootstrap.compiler.toml index 10fa0b3aeb591..c5d2f760eb054 100644 --- a/src/bootstrap/defaults/bootstrap.compiler.toml +++ b/src/bootstrap/defaults/bootstrap.compiler.toml @@ -25,6 +25,8 @@ frame-pointers = true # e.g. check that it builds locally and check the baseline behavior of a # compiler built from latest `main` commit. download-rustc = false +# Don't fail compilation when there are warnings. +deny-warnings = false [llvm] # Having this set to true disrupts compiler development workflows for people who use `llvm.download-ci-llvm = true` diff --git a/src/bootstrap/defaults/bootstrap.dist.toml b/src/bootstrap/defaults/bootstrap.dist.toml index cce3f068aabcd..df39a6a0aa2de 100644 --- a/src/bootstrap/defaults/bootstrap.dist.toml +++ b/src/bootstrap/defaults/bootstrap.dist.toml @@ -26,6 +26,8 @@ download-rustc = false llvm-bitcode-linker = true # Required to make builds reproducible. remap-debuginfo = true +# Fail compilation when there are warnings. +deny-warnings = true [dist] # Use better compression when preparing tarballs. diff --git a/src/bootstrap/defaults/bootstrap.library.toml b/src/bootstrap/defaults/bootstrap.library.toml index 3f811402b26ff..a4665a40d428b 100644 --- a/src/bootstrap/defaults/bootstrap.library.toml +++ b/src/bootstrap/defaults/bootstrap.library.toml @@ -14,6 +14,8 @@ lto = "off" # library development by skipping compiler builds. # FIXME: download-rustc is currently broken: https://github.com/rust-lang/rust/issues/142505 download-rustc = false +# Don't fail compilation when there are warnings. +deny-warnings = false [llvm] # Will download LLVM from CI if available on your platform. diff --git a/src/bootstrap/defaults/bootstrap.tools.toml b/src/bootstrap/defaults/bootstrap.tools.toml index 5abe636bd9683..423ad1a395939 100644 --- a/src/bootstrap/defaults/bootstrap.tools.toml +++ b/src/bootstrap/defaults/bootstrap.tools.toml @@ -6,6 +6,8 @@ incremental = true # Most commonly, tools contributors do not need to modify the compiler, so # downloading a CI rustc is a good default for tools profile. download-rustc = "if-unchanged" +# Don't fail compilation when there are warnings. +deny-warnings = false [build] # cargo and clippy tests don't pass on stage 1 diff --git a/src/bootstrap/src/utils/change_tracker.rs b/src/bootstrap/src/utils/change_tracker.rs index 331403f959b4c..260dc62505b61 100644 --- a/src/bootstrap/src/utils/change_tracker.rs +++ b/src/bootstrap/src/utils/change_tracker.rs @@ -626,4 +626,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[ severity: ChangeSeverity::Info, summary: "New `--verbose-run-make-subprocess-output` flag for `x.py test` (defaults to true). Set `--verbose-run-make-subprocess-output=false` to suppress verbose subprocess output for passing run-make tests when using `--no-capture`.", }, + ChangeInfo { + change_id: 124439, + severity: ChangeSeverity::Info, + summary: "Default for `rust.deny-warnings` on `compiler`, `library` and `tools` profiles changed to `false`", + }, ];