diff --git a/reid/examples/cli.rs b/reid/examples/cli.rs index 1e7ad10..6dc9974 100644 --- a/reid/examples/cli.rs +++ b/reid/examples/cli.rs @@ -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); diff --git a/reid/src/ld.rs b/reid/src/ld.rs index bf7edda..d540167 100644 --- a/reid/src/ld.rs +++ b/reid/src/ld.rs @@ -1,4 +1,4 @@ -use std::{io::Read, path::PathBuf, process::Command}; +use std::{path::PathBuf, process::Command}; pub struct LDRunner { command: String,