diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-12-30 09:26:25 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-12-30 09:36:23 -0800 |
| commit | 4781eb315b7bcf11682d68aafac2ce4739bfe166 (patch) | |
| tree | f8d07d19fb07c907686eebcc645d878476ce3386 /src/bootstrap | |
| parent | d0881eaec7d1300566607bb465acf614ce073b75 (diff) | |
| download | rust-4781eb315b7bcf11682d68aafac2ce4739bfe166.tar.gz rust-4781eb315b7bcf11682d68aafac2ce4739bfe166.zip | |
travis: Add a distcheck target
This commit adds a new entry to the Travis matrix which performs a "distcheck", which basically means that we create a tarball, extract that tarball, and then build/test inside there. This ensures that the tarballs we produce are actually able to be built/tested! Along the way this also updates the rustbuild distcheck definition to propagate the configure args from the top-level invocation. Closes #38691
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/check.rs | 1 | ||||
| -rw-r--r-- | src/bootstrap/config.rs | 6 | ||||
| -rw-r--r-- | src/bootstrap/util.rs | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs index ec0243908ed..0c6680fab66 100644 --- a/src/bootstrap/check.rs +++ b/src/bootstrap/check.rs @@ -554,6 +554,7 @@ pub fn distcheck(build: &Build) { .current_dir(&dir); build.run(&mut cmd); build.run(Command::new("./configure") + .args(&build.config.configure_args) .current_dir(&dir)); build.run(Command::new(build_helper::make(&build.config.build)) .arg("check") diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 9767afd73ca..11c5b374ed9 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -94,6 +94,7 @@ pub struct Config { pub nodejs: Option<PathBuf>, pub gdb: Option<PathBuf>, pub python: Option<PathBuf>, + pub configure_args: Vec<String>, } /// Per-target configuration stored in the global configuration structure. @@ -519,6 +520,11 @@ impl Config { "CFG_ENABLE_SCCACHE" if value == "1" => { self.ccache = Some("sccache".to_string()); } + "CFG_CONFIGURE_ARGS" if value.len() > 0 => { + self.configure_args = value.split_whitespace() + .map(|s| s.to_string()) + .collect(); + } _ => {} } } diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs index c9e756b6f99..2ab3776ada0 100644 --- a/src/bootstrap/util.rs +++ b/src/bootstrap/util.rs @@ -76,9 +76,9 @@ pub fn cp_r(src: &Path, dst: &Path) { /// Copies the `src` directory recursively to `dst`. Both are assumed to exist /// when this function is called. Unwanted files or directories can be skipped /// by returning `false` from the filter function. -pub fn cp_filtered<F: Fn(&Path) -> bool>(src: &Path, dst: &Path, filter: &F) { +pub fn cp_filtered(src: &Path, dst: &Path, filter: &Fn(&Path) -> bool) { // Inner function does the actual work - fn recurse<F: Fn(&Path) -> bool>(src: &Path, dst: &Path, relative: &Path, filter: &F) { + fn recurse(src: &Path, dst: &Path, relative: &Path, filter: &Fn(&Path) -> bool) { for f in t!(fs::read_dir(src)) { let f = t!(f); let path = f.path(); |
