Skip to content

Commit

Permalink
travis: Don't set RUST_LOG globally
Browse files Browse the repository at this point in the history
I have a suspicion that this caused a large regression in cycle times by forcing
the compiler to perform more checks on every `debug!` statement, so let's test
this out by removing the `RUST_LOG` env var globally.

This regression in cycle time was witnessed between [two] [builds] where the
[PR] in question didn't do much suspicious. Judging by how the stage0 times
*also* regressed though then this is my best guess.

[two]: https://travis-ci.org/rust-lang/rust/builds/210149932
[builds]: https://travis-ci.org/rust-lang/rust/builds/210179995
[PR]: rust-lang#40446
  • Loading branch information
alexcrichton committed Mar 20, 2017
1 parent 244f893 commit 7305ca3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ matrix:
SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
Expand All @@ -61,7 +60,6 @@ matrix:
SRC=.
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
Expand All @@ -75,7 +73,6 @@ matrix:
DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
Expand All @@ -90,7 +87,6 @@ matrix:
DEPLOY=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
Expand All @@ -109,7 +105,6 @@ matrix:
DEPLOY_ALT=1
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
SCCACHE_ERROR_LOG=/tmp/sccache.log
RUST_LOG=sccache=debug
MACOSX_DEPLOYMENT_TARGET=10.8
MACOSX_STD_DEPLOYMENT_TARGET=10.7
os: osx
Expand Down
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ install:
- handle.exe -accepteula -help

# Attempt to debug sccache failures
- set RUST_LOG=sccache=debug
- set SCCACHE_ERROR_LOG=%CD%/sccache.log

test_script:
Expand Down
14 changes: 7 additions & 7 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
//! LLVM and compiler-rt are essentially just wired up to everything else to
//! ensure that they're always in place if needed.
use std::env;
use std::fs::{self, File};
use std::io::{Read, Write};
use std::path::Path;
Expand Down Expand Up @@ -145,6 +146,10 @@ pub fn llvm(build: &Build, target: &str) {
cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" "));
}

if env::var_os("SCCACHE_ERROR_LOG").is_some() {
cfg.env("RUST_LOG", "sccache=debug");
}

// FIXME: we don't actually need to build all LLVM tools and all LLVM
// libraries here, e.g. we just want a few components and a few
// tools. Figure out how to filter them down and only build the right
Expand Down
1 change: 0 additions & 1 deletion src/ci/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ if [ "$SCCACHE_BUCKET" != "" ]; then
args="$args --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"
args="$args --env SCCACHE_ERROR_LOG=/tmp/sccache/sccache.log"
args="$args --env SCCACHE_LOG_LEVEL=debug"
args="$args --env RUST_LOG=sccache=debug"
args="$args --volume $objdir/tmp:/tmp/sccache"
else
mkdir -p $HOME/.cache/sccache
Expand Down

0 comments on commit 7305ca3

Please sign in to comment.