| ... | ... | @@ -4702,6 +4702,8 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { |
| 4702 | 4702 | const results_tmp_file_nonce = Package.Manifest.hex64(std.crypto.random.int(u64)); |
| 4703 | 4703 | try child_argv.append("-Z" ++ results_tmp_file_nonce); |
| 4704 | 4704 | |
| 4705 | var color: Color = .auto; |
| 4706 | |
| 4705 | 4707 | { |
| 4706 | 4708 | var i: usize = 0; |
| 4707 | 4709 | while (i < args.len) : (i += 1) { |
| ... | ... | @@ -4786,6 +4788,14 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { |
| 4786 | 4788 | verbose_cimport = true; |
| 4787 | 4789 | } else if (mem.eql(u8, arg, "--verbose-llvm-cpu-features")) { |
| 4788 | 4790 | verbose_llvm_cpu_features = true; |
| 4791 | } else if (mem.eql(u8, arg, "--color")) { |
| 4792 | if (i + 1 >= args.len) fatal("expected [auto|on|off] after {s}", .{arg}); |
| 4793 | i += 1; |
| 4794 | color = std.meta.stringToEnum(Color, args[i]) orelse { |
| 4795 | fatal("expected [auto|on|off] after {s}, found '{s}'", .{ arg, args[i] }); |
| 4796 | }; |
| 4797 | try child_argv.appendSlice(&.{ arg, args[i] }); |
| 4798 | continue; |
| 4789 | 4799 | } else if (mem.eql(u8, arg, "--seed")) { |
| 4790 | 4800 | if (i + 1 >= args.len) fatal("expected argument after '{s}'", .{arg}); |
| 4791 | 4801 | i += 1; |
| ... | ... | @@ -4799,7 +4809,6 @@ fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !void { |
| 4799 | 4809 | |
| 4800 | 4810 | const work_around_btrfs_bug = native_os == .linux and |
| 4801 | 4811 | EnvVar.ZIG_BTRFS_WORKAROUND.isSet(); |
| 4802 | | const color: Color = .auto; |
| 4803 | 4812 | const root_prog_node = std.Progress.start(.{ |
| 4804 | 4813 | .disable_printing = (color == .off), |
| 4805 | 4814 | .root_name = "Compile Build Script", |