* subsecond/cli: fix passing through -fuse-ld for LinkerFlavour::Gnu * if linker isn't a relative, local path, keep it unresolved since its a command on PATH
@@ -1488,6 +1488,7 @@ impl BuildRequest {
|| arg.starts_with("-m")
|| arg.starts_with("-Wl,--target=")
|| arg.starts_with("-Wl,-fuse-ld")
+ || arg.starts_with("-fuse-ld")
{
out_args.push(arg.to_string());
}
@@ -98,7 +98,10 @@ impl LinkAction {
if let Some(linker) = &self.linker {
env_vars.push((
Self::DX_LINK_CUSTOM_LINKER,
- dunce::canonicalize(linker)?.to_string_lossy().to_string(),
+ dunce::canonicalize(linker)
+ .unwrap_or(linker.clone())
+ .to_string_lossy()
+ .to_string(),
));