| ... | ... | @@ -1725,6 +1725,22 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { |
| 1725 | 1725 | try zig_args.ensureUnusedCapacity(2 * self.rpaths.items.len); |
| 1726 | 1726 | for (self.rpaths.items) |rpath| { |
| 1727 | 1727 | zig_args.appendAssumeCapacity("-rpath"); |
| 1728 | |
| 1729 | if (self.target_info.target.isDarwin()) switch (rpath) { |
| 1730 | .path => |path| { |
| 1731 | // On Darwin, we should not try to expand special runtime paths such as |
| 1732 | // * @executable_path |
| 1733 | // * @loader_path |
| 1734 | if (mem.startsWith(u8, path, "@executable_path") or |
| 1735 | mem.startsWith(u8, path, "@loader_path")) |
| 1736 | { |
| 1737 | zig_args.appendAssumeCapacity(path); |
| 1738 | continue; |
| 1739 | } |
| 1740 | }, |
| 1741 | .generated => {}, |
| 1742 | }; |
| 1743 | |
| 1728 | 1744 | zig_args.appendAssumeCapacity(rpath.getPath2(b, step)); |
| 1729 | 1745 | } |
| 1730 | 1746 | |