diff options
| author | bors <bors@rust-lang.org> | 2017-01-17 00:50:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-17 00:50:52 +0000 |
| commit | 4ce7accaa7e64af918e5e8b3fee65096132350f6 (patch) | |
| tree | 64abc5e3a8de9fd9454345a19d038088a7f90ec6 | |
| parent | c2b19c109e798b63a90b13cc7c68e36a18cc27af (diff) | |
| parent | 6f58b7f0ab6433536c1faaed3e75b31759b4457a (diff) | |
| download | rust-4ce7accaa7e64af918e5e8b3fee65096132350f6.tar.gz rust-4ce7accaa7e64af918e5e8b3fee65096132350f6.zip | |
Auto merge of #38949 - GuillaumeGomez:fix_linker, r=nagisa
Fix linker failure on windows Fixes #38933. r? @ollie27
| -rw-r--r-- | src/librustc_driver/driver.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 442c139f14c..b02551b814e 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -46,6 +46,7 @@ use std::mem; use std::ffi::{OsString, OsStr}; use std::fs; use std::io::{self, Write}; +use std::iter; use std::path::{Path, PathBuf}; use syntax::{ast, diagnostics, visit}; use syntax::attr; @@ -667,7 +668,10 @@ pub fn phase_2_configure_and_expand<F>(sess: &Session, new_path.push(path); } } - env::set_var("PATH", &env::join_paths(new_path).unwrap()); + env::set_var("PATH", + &env::join_paths(new_path.iter() + .filter(|p| env::join_paths(iter::once(p)).is_ok())) + .unwrap()); } let features = sess.features.borrow(); let cfg = syntax::ext::expand::ExpansionConfig { |
