| ... | @@ -1772,27 +1772,8 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { | ... | @@ -1772,27 +1772,8 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { |
| 1772 | try zig_args.append(include_path.getPath(b)); | 1772 | try zig_args.append(include_path.getPath(b)); |
| 1773 | }, | 1773 | }, |
| 1774 | .path_system => |include_path| { | 1774 | .path_system => |include_path| { |
| 1775 | if (b.sysroot != null) { | 1775 | try zig_args.append("-isystem"); |
| 1776 | try zig_args.append("-iwithsysroot"); | 1776 | try zig_args.append(include_path.getPath(b)); |
| 1777 | } else { | | |
| 1778 | try zig_args.append("-isystem"); | | |
| 1779 | } | | |
| 1780 | | | |
| 1781 | const resolved_include_path = include_path.getPath(b); | | |
| 1782 | | | |
| 1783 | const common_include_path = if (builtin.os.tag == .windows and b.sysroot != null and fs.path.isAbsolute(resolved_include_path)) blk: { | | |
| 1784 | // We need to check for disk designator and strip it out from dir path so | | |
| 1785 | // that zig/clang can concat resolved_include_path with sysroot. | | |
| 1786 | const disk_designator = fs.path.diskDesignatorWindows(resolved_include_path); | | |
| 1787 | | | |
| 1788 | if (mem.indexOf(u8, resolved_include_path, disk_designator)) |where| { | | |
| 1789 | break :blk resolved_include_path[where + disk_designator.len ..]; | | |
| 1790 | } | | |
| 1791 | | | |
| 1792 | break :blk resolved_include_path; | | |
| 1793 | } else resolved_include_path; | | |
| 1794 | | | |
| 1795 | try zig_args.append(common_include_path); | | |
| 1796 | }, | 1777 | }, |
| 1797 | .other_step => |other| { | 1778 | .other_step => |other| { |
| 1798 | if (other.generated_h) |header| { | 1779 | if (other.generated_h) |header| { |
| ... | @@ -1848,14 +1829,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { | ... | @@ -1848,14 +1829,11 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void { |
| 1848 | } | 1829 | } |
| 1849 | | 1830 | |
| 1850 | for (self.framework_dirs.items) |directory_source| { | 1831 | for (self.framework_dirs.items) |directory_source| { |
| 1851 | if (b.sysroot != null) { | 1832 | const path = directory_source.getPath(b); |
| 1852 | try zig_args.append("-iframeworkwithsysroot"); | 1833 | try zig_args.append("-iframework"); |
| 1853 | } else { | 1834 | try zig_args.append(path); |
| 1854 | try zig_args.append("-iframework"); | | |
| 1855 | } | | |
| 1856 | try zig_args.append(directory_source.getPath2(b, step)); | | |
| 1857 | try zig_args.append("-F"); | 1835 | try zig_args.append("-F"); |
| 1858 | try zig_args.append(directory_source.getPath2(b, step)); | 1836 | try zig_args.append(path); |
| 1859 | } | 1837 | } |
| 1860 | | 1838 | |
| 1861 | { | 1839 | { |