Skip to content

Commit

Permalink
Update brioche-cc to get sysroot from a symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewlacy committed Jan 5, 2025
1 parent e9b6858 commit f61b0e1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/brioche-cc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ fn run() -> eyre::Result<()> {
}

let cc = cc_resource_dir.join(current_exe_name);
let sysroot_path = cc_resource_dir
.join("sysroot")
.canonicalize()
.context("failed to get sysroot path from 'libexec/brioche-cc/sysroot'")?;

let mut args = std::env::args_os();
let arg0 = args.next();
Expand All @@ -50,7 +54,7 @@ fn run() -> eyre::Result<()> {
});

if !has_sysroot_arg {
command.arg("--sysroot").arg(current_exe_parent_dir);
command.arg("--sysroot").arg(sysroot_path);
}

command.args(&args);
Expand Down

0 comments on commit f61b0e1

Please sign in to comment.