| author | |
| committer | |
| log | c15f8b9fc97e141bb59f7d11c3bf4ad76a5036ed |
| tree | 29340fa4af53dd5202dd35ac56b0755ec56f26d9 |
| parent | 90c1123d1c9f02c0c2036053dcf9ad6b35e848da |
| signature | Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM |
When building on macOS Tahoe, binaries were getting duplicate LC_RPATH
load commands which caused dyld to refuse to run them with a
"duplicate LC_RPATH" error that has become a hard error.
The duplicates occurred when library directories were being added
to rpath_list twice:
- from lib_directories
- from native system paths detection which includes the same dirs1 files changed, 8 insertions(+), 0 deletions(-)
src/main.zig+8| ... | ... | @@ -3395,6 +3395,14 @@ fn buildOutputType( |
| 3395 | 3395 | var file_system_inputs: std.ArrayListUnmanaged(u8) = .empty; |
| 3396 | 3396 | defer file_system_inputs.deinit(gpa); |
| 3397 | 3397 | |
| 3398 | // Deduplicate rpath entries | |
| 3399 | var rpath_dedup = std.StringArrayHashMapUnmanaged(void){}; | |
| 3400 | for (create_module.rpath_list.items) |rpath| { | |
| 3401 | try rpath_dedup.put(arena, rpath, {}); | |
| 3402 | } | |
| 3403 | create_module.rpath_list.clearRetainingCapacity(); | |
| 3404 | try create_module.rpath_list.appendSlice(arena, rpath_dedup.keys()); | |
| 3405 | ||
| 3398 | 3406 | var create_diag: Compilation.CreateDiagnostic = undefined; |
| 3399 | 3407 | const comp = Compilation.create(gpa, arena, &create_diag, .{ |
| 3400 | 3408 | .dirs = dirs, |