Skip to content

Commit

Permalink
Write tbd files to cache regardless of -lcharset
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Nov 30, 2024
1 parent b296ac5 commit 8c39406
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/zig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,6 @@ impl Zig {
if target_info.is_macos {
if self.should_add_libcharset(cmd_args, &zig_version) {
new_cmd_args.push("-lcharset".to_string());

// Add the deps directory that contains `.tbd` files to the library search path
let cache_dir = cache_dir();
let deps_dir = cache_dir.join("deps");
fs::create_dir_all(&deps_dir)?;
write_tbd_files(&deps_dir)?;

new_cmd_args.push("-L".to_string());
new_cmd_args.push(format!("{}", deps_dir.display()));
}
self.add_macos_specific_args(&mut new_cmd_args, &zig_version)?;
}
Expand Down Expand Up @@ -395,6 +386,14 @@ impl Zig {
"-DTARGET_OS_IPHONE=0".to_string(),
]);
}

// Add the deps directory that contains `.tbd` files to the library search path
let cache_dir = cache_dir();
let deps_dir = cache_dir.join("deps");
fs::create_dir_all(&deps_dir)?;
write_tbd_files(&deps_dir)?;
new_cmd_args.push("-L".to_string());
new_cmd_args.push(format!("{}", deps_dir.display()));
Ok(())
}

Expand Down

0 comments on commit 8c39406

Please sign in to comment.