Skip to content

Commit

Permalink
Update brioche-ld to find linker under libexec again
Browse files Browse the repository at this point in the history
It now finds the original linker by name though, instead of always looking
for `libexec/brioche-ld/ld`
  • Loading branch information
kylewlacy committed Jan 5, 2025
1 parent b321a7b commit 267fbf8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/brioche-ld/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ fn run() -> eyre::Result<ExitCode> {
);
}

let mut original_exe_name = current_exe_name.to_owned();
original_exe_name.push("-orig");
let original_exe = current_exe.with_file_name(&original_exe_name);

let linker = ld_resource_dir.join(current_exe_name);
let packed_path = ld_resource_dir.join("brioche-packed");

let mut output_path = Some(PathBuf::from("a.out"));
Expand Down Expand Up @@ -110,7 +107,7 @@ fn run() -> eyre::Result<ExitCode> {
Ok("true")
);

let mut command = std::process::Command::new(&original_exe);
let mut command = std::process::Command::new(&linker);
command.args(std::env::args_os().skip(1));
let status = command.status()?;

Expand Down

0 comments on commit 267fbf8

Please sign in to comment.