authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-01-02 04:13:08+11:00
committergravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-01-02 04:13:08+11:00
logaa631cfd1f614a08b2fba2de22b46f8ad212894a
treeaec40251834c2667528234bc77d200f972c880a2
parentb3c9dfc9cc843c2bf9e2c3490334092ea4d9d5a7
signaturelock-open Commit is signed but in an unrecognized format.

Build errors should be followed by two newlines


1 files changed, 21 insertions(+), 17 deletions(-)

lib/std/build.zig+21-17
...@@ -471,32 +471,32 @@ pub const Builder = struct {...@@ -471,32 +471,32 @@ pub const Builder = struct {
471 } else if (mem.eql(u8, s, "false")) {471 } else if (mem.eql(u8, s, "false")) {
472 return false;472 return false;
473 } else {473 } else {
474 warn("Expected -D{} to be a boolean, but received '{}'\n", .{ name, s });474 warn("Expected -D{} to be a boolean, but received '{}'\n\n", .{ name, s });
475 self.markInvalidUserInput();475 self.markInvalidUserInput();
476 return null;476 return null;
477 }477 }
478 },478 },
479 .List => {479 .List => {
480 warn("Expected -D{} to be a boolean, but received a list.\n", .{name});480 warn("Expected -D{} to be a boolean, but received a list.\n\n", .{name});
481 self.markInvalidUserInput();481 self.markInvalidUserInput();
482 return null;482 return null;
483 },483 },
484 },484 },
485 .Int => switch (entry.value.value) {485 .Int => switch (entry.value.value) {
486 .Flag => {486 .Flag => {
487 warn("Expected -D{} to be an integer, but received a boolean.\n", .{name});487 warn("Expected -D{} to be an integer, but received a boolean.\n\n", .{name});
488 self.markInvalidUserInput();488 self.markInvalidUserInput();
489 return null;489 return null;
490 },490 },
491 .Scalar => |s| {491 .Scalar => |s| {
492 const n = std.fmt.parseInt(T, s, 10) catch |err| switch (err) {492 const n = std.fmt.parseInt(T, s, 10) catch |err| switch (err) {
493 error.Overflow => {493 error.Overflow => {
494 warn("-D{} value {} cannot fit into type {}.\n", .{ name, s, @typeName(T) });494 warn("-D{} value {} cannot fit into type {}.\n\n", .{ name, s, @typeName(T) });
495 self.markInvalidUserInput();495 self.markInvalidUserInput();
496 return null;496 return null;
497 },497 },
498 else => {498 else => {
499 warn("Expected -D{} to be an integer of type {}.\n", .{ name, @typeName(T) });499 warn("Expected -D{} to be an integer of type {}.\n\n", .{ name, @typeName(T) });
500 self.markInvalidUserInput();500 self.markInvalidUserInput();
501 return null;501 return null;
502 },502 },
...@@ -504,34 +504,34 @@ pub const Builder = struct {...@@ -504,34 +504,34 @@ pub const Builder = struct {
504 return n;504 return n;
505 },505 },
506 .List => {506 .List => {
507 warn("Expected -D{} to be an integer, but received a list.\n", .{name});507 warn("Expected -D{} to be an integer, but received a list.\n\n", .{name});
508 self.markInvalidUserInput();508 self.markInvalidUserInput();
509 return null;509 return null;
510 },510 },
511 },511 },
512 .Float => switch (entry.value.value) {512 .Float => switch (entry.value.value) {
513 .Flag => {513 .Flag => {
514 warn("Expected -D{} to be a float, but received a boolean.\n", .{name});514 warn("Expected -D{} to be a float, but received a boolean.\n\n", .{name});
515 self.markInvalidUserInput();515 self.markInvalidUserInput();
516 return null;516 return null;
517 },517 },
518 .Scalar => |s| {518 .Scalar => |s| {
519 const n = std.fmt.parseFloat(T, s) catch |err| {519 const n = std.fmt.parseFloat(T, s) catch |err| {
520 warn("Expected -D{} to be a float of type {}.\n", .{ name, @typeName(T) });520 warn("Expected -D{} to be a float of type {}.\n\n", .{ name, @typeName(T) });
521 self.markInvalidUserInput();521 self.markInvalidUserInput();
522 return null;522 return null;
523 };523 };
524 return n;524 return n;
525 },525 },
526 .List => {526 .List => {
527 warn("Expected -D{} to be a float, but received a list.\n", .{name});527 warn("Expected -D{} to be a float, but received a list.\n\n", .{name});
528 self.markInvalidUserInput();528 self.markInvalidUserInput();
529 return null;529 return null;
530 },530 },
531 },531 },
532 .Enum => switch (entry.value.value) {532 .Enum => switch (entry.value.value) {
533 .Flag => {533 .Flag => {
534 warn("Expected -D{} to be a string, but received a boolean.\n", .{name});534 warn("Expected -D{} to be a string, but received a boolean.\n\n", .{name});
535 self.markInvalidUserInput();535 self.markInvalidUserInput();
536 return null;536 return null;
537 },537 },
...@@ -539,25 +539,25 @@ pub const Builder = struct {...@@ -539,25 +539,25 @@ pub const Builder = struct {
539 if (std.meta.stringToEnum(T, s)) |enum_lit| {539 if (std.meta.stringToEnum(T, s)) |enum_lit| {
540 return enum_lit;540 return enum_lit;
541 } else {541 } else {
542 warn("Expected -D{} to be of type {}.\n", .{ name, @typeName(T) });542 warn("Expected -D{} to be of type {}.\n\n", .{ name, @typeName(T) });
543 self.markInvalidUserInput();543 self.markInvalidUserInput();
544 return null;544 return null;
545 }545 }
546 },546 },
547 .List => {547 .List => {
548 warn("Expected -D{} to be a string, but received a list.\n", .{name});548 warn("Expected -D{} to be a string, but received a list.\n\n", .{name});
549 self.markInvalidUserInput();549 self.markInvalidUserInput();
550 return null;550 return null;
551 },551 },
552 },552 },
553 .String => switch (entry.value.value) {553 .String => switch (entry.value.value) {
554 .Flag => {554 .Flag => {
555 warn("Expected -D{} to be a string, but received a boolean.\n", .{name});555 warn("Expected -D{} to be a string, but received a boolean.\n\n", .{name});
556 self.markInvalidUserInput();556 self.markInvalidUserInput();
557 return null;557 return null;
558 },558 },
559 .List => {559 .List => {
560 warn("Expected -D{} to be a string, but received a list.\n", .{name});560 warn("Expected -D{} to be a string, but received a list.\n\n", .{name});
561 self.markInvalidUserInput();561 self.markInvalidUserInput();
562 return null;562 return null;
563 },563 },
...@@ -565,7 +565,7 @@ pub const Builder = struct {...@@ -565,7 +565,7 @@ pub const Builder = struct {
565 },565 },
566 .List => switch (entry.value.value) {566 .List => switch (entry.value.value) {
567 .Flag => {567 .Flag => {
568 warn("Expected -D{} to be a list, but received a boolean.\n", .{name});568 warn("Expected -D{} to be a list, but received a boolean.\n\n", .{name});
569 self.markInvalidUserInput();569 self.markInvalidUserInput();
570 return null;570 return null;
571 },571 },
...@@ -615,7 +615,7 @@ pub const Builder = struct {...@@ -615,7 +615,7 @@ pub const Builder = struct {
615 else if (!release_fast and !release_safe and !release_small)615 else if (!release_fast and !release_safe and !release_small)
616 builtin.Mode.Debug616 builtin.Mode.Debug
617 else x: {617 else x: {
618 warn("Multiple release modes (of -Drelease-safe, -Drelease-fast and -Drelease-small)", .{});618 warn("Multiple release modes (of -Drelease-safe, -Drelease-fast and -Drelease-small)\n\n", .{});
619 self.markInvalidUserInput();619 self.markInvalidUserInput();
620 break :x builtin.Mode.Debug;620 break :x builtin.Mode.Debug;
621 };621 };
...@@ -653,6 +653,7 @@ pub const Builder = struct {...@@ -653,6 +653,7 @@ pub const Builder = struct {
653 for (diags.arch.?.allCpuModels()) |cpu| {653 for (diags.arch.?.allCpuModels()) |cpu| {
654 warn(" {}\n", .{cpu.name});654 warn(" {}\n", .{cpu.name});
655 }655 }
656 warn("\n", .{});
656 self.markInvalidUserInput();657 self.markInvalidUserInput();
657 return args.default_target;658 return args.default_target;
658 },659 },
...@@ -668,6 +669,7 @@ pub const Builder = struct {...@@ -668,6 +669,7 @@ pub const Builder = struct {
668 for (diags.arch.?.allFeaturesList()) |feature| {669 for (diags.arch.?.allFeaturesList()) |feature| {
669 warn(" {}: {}\n", .{ feature.name, feature.description });670 warn(" {}: {}\n", .{ feature.name, feature.description });
670 }671 }
672 warn("\n", .{});
671 self.markInvalidUserInput();673 self.markInvalidUserInput();
672 return args.default_target;674 return args.default_target;
673 },675 },
...@@ -680,11 +682,12 @@ pub const Builder = struct {...@@ -680,11 +682,12 @@ pub const Builder = struct {
680 inline for (std.meta.fields(std.Target.Os.Tag)) |field| {682 inline for (std.meta.fields(std.Target.Os.Tag)) |field| {
681 warn(" {}\n", .{field.name});683 warn(" {}\n", .{field.name});
682 }684 }
685 warn("\n", .{});
683 self.markInvalidUserInput();686 self.markInvalidUserInput();
684 return args.default_target;687 return args.default_target;
685 },688 },
686 else => |e| {689 else => |e| {
687 warn("Unable to parse target '{}': {}\n", .{ triple, @errorName(e) });690 warn("Unable to parse target '{}': {}\n\n", .{ triple, @errorName(e) });
688 self.markInvalidUserInput();691 self.markInvalidUserInput();
689 return args.default_target;692 return args.default_target;
690 },693 },
...@@ -707,6 +710,7 @@ pub const Builder = struct {...@@ -707,6 +710,7 @@ pub const Builder = struct {
707 const t_triple = t.zigTriple(self.allocator) catch unreachable;710 const t_triple = t.zigTriple(self.allocator) catch unreachable;
708 warn(" {}\n", .{t_triple});711 warn(" {}\n", .{t_triple});
709 }712 }
713 warn("\n", .{});
710 self.markInvalidUserInput();714 self.markInvalidUserInput();
711 return args.default_target;715 return args.default_target;
712 }716 }