diff options
| author | bors <bors@rust-lang.org> | 2017-10-25 22:21:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-25 22:21:44 +0000 |
| commit | e847f30f571e617990f7193665ab10127100e9df (patch) | |
| tree | a2a8f24bd05e4c97879826ee4454cdb3bfc92461 /src/bootstrap | |
| parent | f9d24165948a926263444bfe763f9861cb683246 (diff) | |
| parent | 851d1c736571b38e68001023167199225377e3b9 (diff) | |
| download | rust-e847f30f571e617990f7193665ab10127100e9df.tar.gz rust-e847f30f571e617990f7193665ab10127100e9df.zip | |
Auto merge of #45532 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests - Successful merges: #45059, #45212, #45398, #45483, #45496, #45508, #45526 - Failed merges:
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/compile.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index a8162f0a92f..4540f620872 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -860,10 +860,18 @@ fn run_cargo(build: &Build, cargo: &mut Command, stamp: &Path) { // have a hash in the name, but there's a version of this file in // the `deps` folder which *does* have a hash in the name. That's // the one we'll want to we'll probe for it later. - toplevel.push((filename.file_stem().unwrap() - .to_str().unwrap().to_string(), - filename.extension().unwrap().to_owned() - .to_str().unwrap().to_string())); + // + // We do not use `Path::file_stem` or `Path::extension` here, + // because some generated files may have multiple extensions e.g. + // `std-<hash>.dll.lib` on Windows. The aforementioned methods only + // split the file name by the last extension (`.lib`) while we need + // to split by all extensions (`.dll.lib`). + let filename = filename.file_name().unwrap().to_str().unwrap(); + let mut parts = filename.splitn(2, '.'); + let file_stem = parts.next().unwrap().to_owned(); + let extension = parts.next().unwrap().to_owned(); + + toplevel.push((file_stem, extension)); } } |
