Skip to content

Commit 13cf229

Browse files
committed
disable gcc warnings
1 parent 12d84cc commit 13cf229

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

src/bootstrap/bin/sccache-plus-cl.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn main() {
2424
.target(&target)
2525
.host(&target)
2626
.opt_level(0)
27+
.warnings(false)
2728
.debug(false);
2829
let compiler = cfg.get_compiler();
2930

src/bootstrap/cc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub fn find(build: &mut Build) {
4646
// and such as well as for being a linker for Rust code.
4747
for target in build.targets.iter().chain(&build.hosts).cloned().chain(iter::once(build.build)) {
4848
let mut cfg = gcc::Build::new();
49-
cfg.cargo_metadata(false).opt_level(0).debug(false)
49+
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false)
5050
.target(&target).host(&build.build);
5151

5252
let config = build.config.target_config.get(&target);
@@ -68,7 +68,7 @@ pub fn find(build: &mut Build) {
6868
// For all host triples we need to find a C++ compiler as well
6969
for host in build.hosts.iter().cloned().chain(iter::once(build.build)) {
7070
let mut cfg = gcc::Build::new();
71-
cfg.cargo_metadata(false).opt_level(0).debug(false).cpp(true)
71+
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false).cpp(true)
7272
.target(&host).host(&build.build);
7373
let config = build.config.target_config.get(&host);
7474
if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {

src/bootstrap/native.rs

+1
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ impl Step for TestHelpers {
306306
.target(&target)
307307
.host(&build.build)
308308
.opt_level(0)
309+
.warnings(false)
309310
.debug(false)
310311
.file(build.src.join("src/rt/rust_test_helpers.c"))
311312
.compile("librust_test_helpers.a");

src/librustc_llvm/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ fn main() {
137137
cmd.arg("--cxxflags");
138138
let cxxflags = output(&mut cmd);
139139
let mut cfg = gcc::Build::new();
140+
cfg.warnings(false);
140141
for flag in cxxflags.split_whitespace() {
141142
// Ignore flags like `-m64` when we're doing a cross build
142143
if is_crossed && flag.starts_with("-m") {

0 commit comments

Comments
 (0)