We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5d4efcb + e77ab57 commit 439e184Copy full SHA for 439e184
src/librustc_trans/back/msvc/mod.rs
@@ -152,8 +152,15 @@ pub fn link_exe_cmd(sess: &Session) -> Command {
152
}).and_then(|root| {
153
fs::read_dir(Path::new(&root).join("Lib")).ok()
154
}).and_then(|readdir| {
155
- let mut dirs: Vec<_> = readdir.filter_map(|dir| dir.ok())
156
- .map(|dir| dir.path()).collect();
+ let mut dirs: Vec<_> = readdir.filter_map(|dir| {
+ dir.ok()
157
+ }).map(|dir| {
158
+ dir.path()
159
+ }).filter(|dir| {
160
+ dir.components().last().and_then(|c| {
161
+ c.as_os_str().to_str()
162
+ }).map(|c| c.starts_with("10.")).unwrap_or(false)
163
+ }).collect();
164
dirs.sort();
165
dirs.pop()
166
})
0 commit comments