Skip to content

Commit f12495f

Browse files
committed
Set deny-warnings for compiler/library/tools profiles to false
1 parent 1948ee1 commit f12495f

6 files changed

Lines changed: 25 additions & 3 deletions

File tree

bootstrap.example.toml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,9 +826,18 @@
826826
# in the sysroot. It is required for running nvptx tests.
827827
#rust.llvm-bitcode-linker = false
828828

829-
# Whether to deny warnings in crates. Set to `false` to avoid
830-
# error: warnings are denied by `build.warnings` configuration
831-
#rust.deny-warnings = true
829+
# Whether to deny warnings in crates.
830+
#
831+
# Set to `true` to fail the build if there are warnings in crates,
832+
# to not accidentally miss warnings in long build output.
833+
#
834+
# Set to `false` to avoid "error: warnings are denied by `build.warnings` configuration"
835+
# and have easier time iterating on your changes.
836+
#
837+
# This is set to `true` by default for the `dist` profile and to `false` otherwise.
838+
#
839+
# Note that CI denies warnings.
840+
#rust.deny-warnings = false
832841

833842
# Print backtrace on internal compiler errors during bootstrap
834843
#rust.backtrace-on-ice = false

src/bootstrap/defaults/bootstrap.compiler.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ frame-pointers = true
2525
# e.g. check that it builds locally and check the baseline behavior of a
2626
# compiler built from latest `main` commit.
2727
download-rustc = false
28+
# Don't fail compilation when there are warnings.
29+
deny-warnings = false
2830

2931
[llvm]
3032
# Having this set to true disrupts compiler development workflows for people who use `llvm.download-ci-llvm = true`

src/bootstrap/defaults/bootstrap.dist.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ download-rustc = false
2626
llvm-bitcode-linker = true
2727
# Required to make builds reproducible.
2828
remap-debuginfo = true
29+
# Fail compilation when there are warnings.
30+
deny-warnings = true
2931

3032
[dist]
3133
# Use better compression when preparing tarballs.

src/bootstrap/defaults/bootstrap.library.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ lto = "off"
1414
# library development by skipping compiler builds.
1515
# FIXME: download-rustc is currently broken: https://github.com/rust-lang/rust/issues/142505
1616
download-rustc = false
17+
# Don't fail compilation when there are warnings.
18+
deny-warnings = false
1719

1820
[llvm]
1921
# Will download LLVM from CI if available on your platform.

src/bootstrap/defaults/bootstrap.tools.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ incremental = true
66
# Most commonly, tools contributors do not need to modify the compiler, so
77
# downloading a CI rustc is a good default for tools profile.
88
download-rustc = "if-unchanged"
9+
# Don't fail compilation when there are warnings.
10+
deny-warnings = false
911

1012
[build]
1113
# cargo and clippy tests don't pass on stage 1

src/bootstrap/src/utils/change_tracker.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,4 +621,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
621621
severity: ChangeSeverity::Info,
622622
summary: "`x.py` stopped accepting partial argument names. Use full names to avoid errors.",
623623
},
624+
ChangeInfo {
625+
change_id: 124439,
626+
severity: ChangeSeverity::Info,
627+
summary: "Default for `rust.deny-warnings` on `compiler`, `library` and `tools` profiles changed to `false`",
628+
},
624629
];

0 commit comments

Comments
 (0)