diff --git a/lib/std/build.zig b/lib/std/build.zig index dd8dcaed40..1565980279 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -557,7 +557,15 @@ pub const Builder = struct { }, UserValue.Scalar => |s| return s, }, - TypeId.List => panic("TODO list options to build script", .{}), + TypeId.List => switch (entry.value.value) { + UserValue.Flag => { + warn("Expected -D{} to be a list, but received a boolean.\n", .{name}); + self.markInvalidUserInput(); + return null; + }, + UserValue.Scalar => |s| return &[_][]const u8{s}, + UserValue.List => |lst| return lst.toSliceConst(), + }, } }