Skip to content

Commit

Permalink
Auto merge of #43895 - JeremySorensen:master, r=alexcrichton
Browse files Browse the repository at this point in the history
make ignore-git true by default when channel is dev

Fixes #43771
(Handle git info in rustbuild differently)
  • Loading branch information
bors committed Aug 30, 2017
2 parents ca9cf35 + 4f591a4 commit 51a54b6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
5 changes: 4 additions & 1 deletion config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,10 @@
#codegen-tests = true

# Flag indicating whether git info will be retrieved from .git automatically.
#ignore-git = false
# Having the git information can cause a lot of rebuilds during development.
# Note: If this attribute is not explicity set (e.g. if left commented out) it
# will default to true if channel = "dev", but will default to false otherwise.
#ignore-git = true

# When creating source tarballs whether or not to create a source tarball.
#dist-src = false
Expand Down
6 changes: 5 additions & 1 deletion src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ impl Config {
let mut debuginfo = None;
let mut debug_assertions = None;
let mut optimize = None;
let mut ignore_git = None;

if let Some(ref llvm) = toml.llvm {
match llvm.ccache {
Expand Down Expand Up @@ -432,6 +433,7 @@ impl Config {
debuginfo_lines = rust.debuginfo_lines;
debuginfo_only_std = rust.debuginfo_only_std;
optimize = rust.optimize;
ignore_git = rust.ignore_git;
debug_jemalloc = rust.debug_jemalloc;
set(&mut config.rust_optimize_tests, rust.optimize_tests);
set(&mut config.rust_debuginfo_tests, rust.debuginfo_tests);
Expand All @@ -440,7 +442,6 @@ impl Config {
set(&mut config.use_jemalloc, rust.use_jemalloc);
set(&mut config.backtrace, rust.backtrace);
set(&mut config.channel, rust.channel.clone());
set(&mut config.ignore_git, rust.ignore_git);
set(&mut config.rust_dist_src, rust.dist_src);
set(&mut config.quiet_tests, rust.quiet_tests);
config.rustc_default_linker = rust.default_linker.clone();
Expand Down Expand Up @@ -516,6 +517,9 @@ impl Config {
config.rust_debug_assertions = debug_assertions.unwrap_or(default);
config.rust_optimize = optimize.unwrap_or(!default);

let default = config.channel == "dev";
config.ignore_git = ignore_git.unwrap_or(default);

config
}

Expand Down
10 changes: 8 additions & 2 deletions src/bootstrap/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,17 @@ def set(key, value):
arr = arr[part]

for key in known_args:
# The `set` option is special and an be passed a bunch of times
# The `set` option is special and can be passed a bunch of times
if key == 'set':
for option, value in known_args[key]:
keyval = value.split('=', 1)
set(keyval[0], True if len(keyval) == 1 else keyval[1])
if len(keyval) == 1 or keyval[1] == "true":
value = True
elif keyval[1] == "false":
value = False
else:
value = keyval[1]
set(keyval[0], value)
continue

# Ensure each option is only passed once
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/x86_64-gnu-distcheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu
ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --set rust.ignore-git=false
ENV SCRIPT python2.7 ../x.py test distcheck
ENV DIST_SRC 1

0 comments on commit 51a54b6

Please sign in to comment.