Skip to content

Commit 53eb08b

Browse files
committed
Auto merge of #40686 - alexcrichton:less-logging, r=brson
travis: Don't set `RUST_LOG` globally 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]: #40446
2 parents 134c4a0 + 7305ca3 commit 53eb08b

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

.travis.yml

-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ matrix:
4747
SRC=.
4848
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
4949
SCCACHE_ERROR_LOG=/tmp/sccache.log
50-
RUST_LOG=sccache=debug
5150
MACOSX_DEPLOYMENT_TARGET=10.8
5251
MACOSX_STD_DEPLOYMENT_TARGET=10.7
5352
os: osx
@@ -61,7 +60,6 @@ matrix:
6160
SRC=.
6261
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
6362
SCCACHE_ERROR_LOG=/tmp/sccache.log
64-
RUST_LOG=sccache=debug
6563
MACOSX_DEPLOYMENT_TARGET=10.8
6664
MACOSX_STD_DEPLOYMENT_TARGET=10.7
6765
os: osx
@@ -75,7 +73,6 @@ matrix:
7573
DEPLOY=1
7674
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
7775
SCCACHE_ERROR_LOG=/tmp/sccache.log
78-
RUST_LOG=sccache=debug
7976
MACOSX_DEPLOYMENT_TARGET=10.8
8077
MACOSX_STD_DEPLOYMENT_TARGET=10.7
8178
os: osx
@@ -90,7 +87,6 @@ matrix:
9087
DEPLOY=1
9188
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
9289
SCCACHE_ERROR_LOG=/tmp/sccache.log
93-
RUST_LOG=sccache=debug
9490
MACOSX_DEPLOYMENT_TARGET=10.8
9591
MACOSX_STD_DEPLOYMENT_TARGET=10.7
9692
os: osx
@@ -109,7 +105,6 @@ matrix:
109105
DEPLOY_ALT=1
110106
RUSTC_RETRY_LINKER_ON_SEGFAULT=1
111107
SCCACHE_ERROR_LOG=/tmp/sccache.log
112-
RUST_LOG=sccache=debug
113108
MACOSX_DEPLOYMENT_TARGET=10.8
114109
MACOSX_STD_DEPLOYMENT_TARGET=10.7
115110
os: osx

appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ install:
131131
- handle.exe -accepteula -help
132132

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

137136
test_script:

src/Cargo.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/bootstrap/native.rs

+5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//! LLVM and compiler-rt are essentially just wired up to everything else to
1919
//! ensure that they're always in place if needed.
2020
21+
use std::env;
2122
use std::fs::{self, File};
2223
use std::io::{Read, Write};
2324
use std::path::Path;
@@ -145,6 +146,10 @@ pub fn llvm(build: &Build, target: &str) {
145146
cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" "));
146147
}
147148

149+
if env::var_os("SCCACHE_ERROR_LOG").is_some() {
150+
cfg.env("RUST_LOG", "sccache=debug");
151+
}
152+
148153
// FIXME: we don't actually need to build all LLVM tools and all LLVM
149154
// libraries here, e.g. we just want a few components and a few
150155
// tools. Figure out how to filter them down and only build the right

src/ci/docker/run.sh

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ if [ "$SCCACHE_BUCKET" != "" ]; then
3939
args="$args --env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY"
4040
args="$args --env SCCACHE_ERROR_LOG=/tmp/sccache/sccache.log"
4141
args="$args --env SCCACHE_LOG_LEVEL=debug"
42-
args="$args --env RUST_LOG=sccache=debug"
4342
args="$args --volume $objdir/tmp:/tmp/sccache"
4443
else
4544
mkdir -p $HOME/.cache/sccache

0 commit comments

Comments
 (0)