diff options
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(); |
