| author | |
| committer | |
| log | a249201aecdb0a342ba871ce7adc86926297dcee |
| tree | f004106fdd251bfc182eab55302659f7c636dce1 |
| parent | 42be6c0088ece7f3df2a30cfbaee0d77151f762a |
6 files changed, 10 insertions(+), 14 deletions(-)
lib/compiler/Maker/Step.zig+4-3| ... | @@ -19,11 +19,12 @@ const WebServer = @import("WebServer.zig"); | ... | @@ -19,11 +19,12 @@ const WebServer = @import("WebServer.zig"); |
| 19 | const Maker = @import("../Maker.zig"); | 19 | const Maker = @import("../Maker.zig"); |
| 20 | 20 | ||
| 21 | pub const Compile = @import("Step/Compile.zig"); | 21 | pub const Compile = @import("Step/Compile.zig"); |
| 22 | pub const Run = @import("Step/Run.zig"); | 22 | pub const Fmt = @import("Step/Fmt.zig"); |
| 23 | pub const InstallArtifact = @import("Step/InstallArtifact.zig"); | 23 | pub const InstallArtifact = @import("Step/InstallArtifact.zig"); |
| 24 | pub const InstallFile = @import("Step/InstallFile.zig"); | 24 | pub const InstallFile = @import("Step/InstallFile.zig"); |
| 25 | pub const UpdateSourceFiles = @import("Step/UpdateSourceFiles.zig"); | ||
| 26 | pub const ObjCopy = @import("Step/ObjCopy.zig"); | 25 | pub const ObjCopy = @import("Step/ObjCopy.zig"); |
| 26 | pub const Run = @import("Step/Run.zig"); | ||
| 27 | pub const UpdateSourceFiles = @import("Step/UpdateSourceFiles.zig"); | ||
| 27 | 28 | ||
| 28 | /// Avoid false sharing. | 29 | /// Avoid false sharing. |
| 29 | _: void align(std.atomic.cache_line) = {}, | 30 | _: void align(std.atomic.cache_line) = {}, |
| ... | @@ -73,7 +74,7 @@ pub const Extended = union(enum) { | ... | @@ -73,7 +74,7 @@ pub const Extended = union(enum) { |
| 73 | config_header: Todo, | 74 | config_header: Todo, |
| 74 | fail: Fail, | 75 | fail: Fail, |
| 75 | find_program: Todo, | 76 | find_program: Todo, |
| 76 | fmt: Todo, | 77 | fmt: Fmt, |
| 77 | install_artifact: InstallArtifact, | 78 | install_artifact: InstallArtifact, |
| 78 | install_dir: Todo, | 79 | install_dir: Todo, |
| 79 | install_file: InstallFile, | 80 | install_file: InstallFile, |
lib/compiler/Maker/Step/ConfigHeader.zig-1| ... | @@ -106,7 +106,6 @@ pub fn make( | ... | @@ -106,7 +106,6 @@ pub fn make( |
| 106 | try man.writeManifest(); | 106 | try man.writeManifest(); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | |||
| 110 | fn render_autoconf_undef( | 109 | fn render_autoconf_undef( |
| 111 | step: *Step, | 110 | step: *Step, |
| 112 | contents: []const u8, | 111 | contents: []const u8, |
lib/compiler/Maker/Step/Fmt.zig+6-6| ... | @@ -24,7 +24,7 @@ pub fn make( | ... | @@ -24,7 +24,7 @@ pub fn make( |
| 24 | const conf_step = step_index.ptr(conf); | 24 | const conf_step = step_index.ptr(conf); |
| 25 | const conf_fmt = conf_step.extended.get(conf.extra).fmt; | 25 | const conf_fmt = conf_step.extended.get(conf.extra).fmt; |
| 26 | const paths = conf_fmt.paths.slice; | 26 | const paths = conf_fmt.paths.slice; |
| 27 | const exclude_paths = conf_fmt.paths.exclude_paths; | 27 | const exclude_paths = conf_fmt.exclude_paths.slice; |
| 28 | 28 | ||
| 29 | argv.clearRetainingCapacity(); | 29 | argv.clearRetainingCapacity(); |
| 30 | try argv.ensureUnusedCapacity(gpa, 2 + 1 + paths.len + 2 * exclude_paths.len); | 30 | try argv.ensureUnusedCapacity(gpa, 2 + 1 + paths.len + 2 * exclude_paths.len); |
| ... | @@ -32,23 +32,23 @@ pub fn make( | ... | @@ -32,23 +32,23 @@ pub fn make( |
| 32 | argv.appendAssumeCapacity(graph.zig_exe); | 32 | argv.appendAssumeCapacity(graph.zig_exe); |
| 33 | argv.appendAssumeCapacity("fmt"); | 33 | argv.appendAssumeCapacity("fmt"); |
| 34 | 34 | ||
| 35 | if (fmt.check) | 35 | if (conf_fmt.flags.check) |
| 36 | argv.appendAssumeCapacity("--check"); | 36 | argv.appendAssumeCapacity("--check"); |
| 37 | 37 | ||
| 38 | for (fmt.paths) |lp| | 38 | for (paths) |lp| |
| 39 | argv.appendAssumeCapacity(try maker.resolveLazyPathIndexAbs(arena, lp, step_index)); | 39 | argv.appendAssumeCapacity(try maker.resolveLazyPathIndexAbs(arena, lp, step_index)); |
| 40 | 40 | ||
| 41 | for (fmt.exclude_paths) |lp| { | 41 | for (exclude_paths) |lp| { |
| 42 | argv.appendAssumeCapacity("--exclude"); | 42 | argv.appendAssumeCapacity("--exclude"); |
| 43 | argv.appendAssumeCapacity(try maker.resolveLazyPathIndexAbs(arena, lp, step_index)); | 43 | argv.appendAssumeCapacity(try maker.resolveLazyPathIndexAbs(arena, lp, step_index)); |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | const run_result = try step.captureChildProcess(maker, progress_node, argv.items); | 46 | const run_result = try step.captureChildProcess(maker, progress_node, argv.items); |
| 47 | if (fmt.check) switch (run_result.term) { | 47 | if (conf_fmt.flags.check) switch (run_result.term) { |
| 48 | .exited => |code| if (code != 0 and run_result.stdout.len != 0) { | 48 | .exited => |code| if (code != 0 and run_result.stdout.len != 0) { |
| 49 | var it = std.mem.tokenizeScalar(u8, run_result.stdout, '\n'); | 49 | var it = std.mem.tokenizeScalar(u8, run_result.stdout, '\n'); |
| 50 | while (it.next()) |bad_file_name| { | 50 | while (it.next()) |bad_file_name| { |
| 51 | try step.addError("{s}: non-conforming formatting", .{bad_file_name}); | 51 | try step.addError(maker, "{s}: non-conforming formatting", .{bad_file_name}); |
| 52 | } | 52 | } |
| 53 | }, | 53 | }, |
| 54 | else => {}, | 54 | else => {}, |
lib/compiler/Maker/Step/Options.zig-2| ... | @@ -6,7 +6,6 @@ const Configuration = std.Build.Configuration; | ... | @@ -6,7 +6,6 @@ const Configuration = std.Build.Configuration; |
| 6 | const Step = @import("../Step.zig"); | 6 | const Step = @import("../Step.zig"); |
| 7 | const Maker = @import("../../Maker.zig"); | 7 | const Maker = @import("../../Maker.zig"); |
| 8 | 8 | ||
| 9 | |||
| 10 | pub fn make( | 9 | pub fn make( |
| 11 | options: *Options, | 10 | options: *Options, |
| 12 | step_index: Configuration.Step.Index, | 11 | step_index: Configuration.Step.Index, |
| ... | @@ -81,4 +80,3 @@ pub fn make( | ... | @@ -81,4 +80,3 @@ pub fn make( |
| 81 | }), | 80 | }), |
| 82 | } | 81 | } |
| 83 | } | 82 | } |
| 84 |
lib/compiler/Maker/Step/TranslateC.zig-1| ... | @@ -1,4 +1,3 @@ | ... | @@ -1,4 +1,3 @@ |
| 1 | |||
| 2 | fn make(step: *Step, options: Step.MakeOptions) !void { | 1 | fn make(step: *Step, options: Step.MakeOptions) !void { |
| 3 | const prog_node = options.progress_node; | 2 | const prog_node = options.progress_node; |
| 4 | const b = step.owner; | 3 | const b = step.owner; |
lib/compiler/Maker/Step/WriteFile.zig-1| ... | @@ -1,4 +1,3 @@ | ... | @@ -1,4 +1,3 @@ |
| 1 | |||
| 2 | fn make(step: *Step, options: Step.MakeOptions) !void { | 1 | fn make(step: *Step, options: Step.MakeOptions) !void { |
| 3 | _ = options; | 2 | _ = options; |
| 4 | const b = step.owner; | 3 | const b = step.owner; |