Fix LD-environment variable

This commit is contained in:
Sofia 2025-07-23 19:01:24 +03:00
parent 1a65b4085f
commit bb69ce4968
2 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,8 @@ fn main() -> Result<(), std::io::Error> {
);
println!("Linking {:?}", &object_path);
let linker = option_env!("LD").unwrap_or("ld").to_owned();
let linker = std::env::var("LD").unwrap_or("ld".to_owned());
let mut linker = LDRunner::from_command(linker).with_library("c".to_owned());
for library in libraries {
linker = linker.with_library(library);

View File

@ -1,4 +1,4 @@
use std::{io::Read, path::PathBuf, process::Command};
use std::{path::PathBuf, process::Command};
pub struct LDRunner {
command: String,