subsecond/cli: fix linker and passing through -fuse-ld properly (#4222)
* 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
This commit is contained in:
1 parent
3a5b68e56d
commit
937e9b9789
2 files changed
+5
-1
No files matched your search
@@ -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(),
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user