Auto merge of #43895 - JeremySorensen:master, r=alexcrichton
make ignore-git true by default when channel is dev Fixes #43771 (Handle git info in rustbuild differently)
This commit is contained in:
commit
51a54b6dc0
@ -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
|
||||
|
@ -401,6 +401,7 @@ pub fn parse(args: &[String]) -> 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 {
|
||||
@ -432,6 +433,7 @@ pub fn parse(args: &[String]) -> 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);
|
||||
@ -440,7 +442,6 @@ pub fn parse(args: &[String]) -> 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();
|
||||
@ -516,6 +517,9 @@ pub fn parse(args: &[String]) -> 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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user