[[package]]
name = "stacker"
-version = "0.1.9"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72dd941b456e1c006d6b9f27c526d5b69281288aeea8cba82c19d3843d8ccdd2"
+checksum = "a92bc346006ae78c539d6ab2cf1a1532bc657b8339c464877a990ec82073c66f"
dependencies = [
"cc",
"cfg-if",
if let Some(implib_name) = implib_name {
let implib = out_filename.parent().map(|dir| dir.join(&implib_name));
if let Some(implib) = implib {
- self.linker_arg(&format!("--out-implib,{}", (*implib).to_str().unwrap()));
+ self.linker_arg(&format!("--out-implib={}", (*implib).to_str().unwrap()));
}
}
}
&& file.ends_with(&self.target.options.dll_suffix)
{
// Make sure there's at most one rlib and at most one dylib.
- let loc = fs::canonicalize(&loc).unwrap_or_else(|_| loc.clone());
+ // Note to take care and match against the non-canonicalized name:
+ // some systems save build artifacts into content-addressed stores
+ // that do not preserve extensions, and then link to them using
+ // e.g. symbolic links. If we canonicalize too early, we resolve
+ // the symlink, the file type is lost and we might treat rlibs and
+ // rmetas as dylibs.
+ let loc_canon = fs::canonicalize(&loc).unwrap_or_else(|_| loc.clone());
if loc.file_name().unwrap().to_str().unwrap().ends_with(".rlib") {
- rlibs.insert(loc, PathKind::ExternFlag);
+ rlibs.insert(loc_canon, PathKind::ExternFlag);
} else if loc.file_name().unwrap().to_str().unwrap().ends_with(".rmeta") {
- rmetas.insert(loc, PathKind::ExternFlag);
+ rmetas.insert(loc_canon, PathKind::ExternFlag);
} else {
- dylibs.insert(loc, PathKind::ExternFlag);
+ dylibs.insert(loc_canon, PathKind::ExternFlag);
}
} else {
self.rejected_via_filename