Skip to content

Commit

Permalink
disable gcc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Sep 5, 2017
1 parent 12d84cc commit 13cf229
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/bootstrap/bin/sccache-plus-cl.rs
Expand Up @@ -24,6 +24,7 @@ fn main() {
.target(&target)
.host(&target)
.opt_level(0)
.warnings(false)
.debug(false);
let compiler = cfg.get_compiler();

Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/cc.rs
Expand Up @@ -46,7 +46,7 @@ pub fn find(build: &mut Build) {
// and such as well as for being a linker for Rust code.
for target in build.targets.iter().chain(&build.hosts).cloned().chain(iter::once(build.build)) {
let mut cfg = gcc::Build::new();
cfg.cargo_metadata(false).opt_level(0).debug(false)
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false)
.target(&target).host(&build.build);

let config = build.config.target_config.get(&target);
Expand All @@ -68,7 +68,7 @@ pub fn find(build: &mut Build) {
// For all host triples we need to find a C++ compiler as well
for host in build.hosts.iter().cloned().chain(iter::once(build.build)) {
let mut cfg = gcc::Build::new();
cfg.cargo_metadata(false).opt_level(0).debug(false).cpp(true)
cfg.cargo_metadata(false).opt_level(0).warnings(false).debug(false).cpp(true)
.target(&host).host(&build.build);
let config = build.config.target_config.get(&host);
if let Some(cxx) = config.and_then(|c| c.cxx.as_ref()) {
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/native.rs
Expand Up @@ -306,6 +306,7 @@ impl Step for TestHelpers {
.target(&target)
.host(&build.build)
.opt_level(0)
.warnings(false)
.debug(false)
.file(build.src.join("src/rt/rust_test_helpers.c"))
.compile("librust_test_helpers.a");
Expand Down
1 change: 1 addition & 0 deletions src/librustc_llvm/build.rs
Expand Up @@ -137,6 +137,7 @@ fn main() {
cmd.arg("--cxxflags");
let cxxflags = output(&mut cmd);
let mut cfg = gcc::Build::new();
cfg.warnings(false);
for flag in cxxflags.split_whitespace() {
// Ignore flags like `-m64` when we're doing a cross build
if is_crossed && flag.starts_with("-m") {
Expand Down

0 comments on commit 13cf229

Please sign in to comment.