| ... | @@ -859,7 +859,28 @@ fn serialize(b: *std.Build, wc: *Configuration.Wip, writer: *Io.Writer) !void { | ... | @@ -859,7 +859,28 @@ fn serialize(b: *std.Build, wc: *Configuration.Wip, writer: *Io.Writer) !void { |
| 859 | .dest_sub_path = try wc.addString(sif.dest_rel_path), | 859 | .dest_sub_path = try wc.addString(sif.dest_rel_path), |
| 860 | }))); | 860 | }))); |
| 861 | }, | 861 | }, |
| 862 | .install_dir => @panic("TODO"), | 862 | .install_dir => e: { |
| | 863 | const sid: *Step.InstallDir = @fieldParentPtr("step", step); |
| | 864 | const dest_sub_path: ?[]const u8 = if (sid.options.install_subdir.len != 0) |
| | 865 | sid.options.install_subdir |
| | 866 | else |
| | 867 | null; |
| | 868 | const include_extensions = sid.options.include_extensions orelse &.{}; |
| | 869 | break :e @enumFromInt(try wc.addExtra(@as(Configuration.Step.InstallDir, .{ |
| | 870 | .flags = .{ |
| | 871 | .dest_sub_path = dest_sub_path != null, |
| | 872 | .exclude_extensions = sid.options.exclude_extensions.len != 0, |
| | 873 | .include_extensions = include_extensions.len != 0, |
| | 874 | .blank_extensions = sid.options.blank_extensions.len != 0, |
| | 875 | }, |
| | 876 | .source_dir = try s.addLazyPath(sid.options.source_dir), |
| | 877 | .dest_dir = try addInstallDir(wc, sid.options.install_dir), |
| | 878 | .dest_sub_path = .{ .value = try s.addOptionalString(dest_sub_path) }, |
| | 879 | .exclude_extensions = .{ .slice = try s.initStringList(sid.options.exclude_extensions) }, |
| | 880 | .include_extensions = .{ .slice = try s.initStringList(include_extensions) }, |
| | 881 | .blank_extensions = .{ .slice = try s.initStringList(sid.options.blank_extensions) }, |
| | 882 | }))); |
| | 883 | }, |
| 863 | .remove_dir => @panic("TODO"), | 884 | .remove_dir => @panic("TODO"), |
| 864 | .fail => e: { | 885 | .fail => e: { |
| 865 | const sf: *Step.Fail = @fieldParentPtr("step", step); | 886 | const sf: *Step.Fail = @fieldParentPtr("step", step); |