diff options
| author | Paul Faria <Nashenas88@gmail.com> | 2017-04-08 18:53:57 -0400 |
|---|---|---|
| committer | Paul Faria <Nashenas88@gmail.com> | 2017-04-08 18:53:57 -0400 |
| commit | a6f7628ea28a74e09002e430609b6e6ce52fd0ba (patch) | |
| tree | 738bc70a09faf0ec88373763b1504ee469faaa25 /src/bootstrap | |
| parent | 666e7148d167de551a7c3692caf9966f49773f4c (diff) | |
| download | rust-a6f7628ea28a74e09002e430609b6e6ce52fd0ba.tar.gz rust-a6f7628ea28a74e09002e430609b6e6ce52fd0ba.zip | |
Use the existing path when removing the prefix fails. This allows the use of out-of-tree paths to be specified
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/step.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/step.rs b/src/bootstrap/step.rs index 5560b5b0333..74c9ae98373 100644 --- a/src/bootstrap/step.rs +++ b/src/bootstrap/step.rs @@ -137,7 +137,9 @@ pub fn build_rules<'a>(build: &'a Build) -> Rules { while let Some(krate) = list.pop() { let default = krate == name; let krate = &build.crates[krate]; - let path = krate.path.strip_prefix(&build.src).unwrap(); + let path = krate.path.strip_prefix(&build.src) + // This handles out of tree paths + .unwrap_or(&krate.path); ret.push((krate, path.to_str().unwrap(), default)); for dep in krate.deps.iter() { if visited.insert(dep) && dep != "build_helper" { |
