Fix some stage2 compilation errors

This commit is contained in:
Mitchell Hashimoto
2022-08-17 14:42:23 -07:00
parent fcfd8da57a
commit 5c2edf4d2a
11 changed files with 14 additions and 9 deletions

View File

@ -170,7 +170,7 @@ fn conformanceSteps(
var map = std.StringHashMap(*LibExeObjStep).init(b.allocator);
// Open the directory ./conformance
const c_dir_path = root() ++ "/conformance";
const c_dir_path = (comptime root()) ++ "/conformance";
var c_dir = try fs.openIterableDirAbsolute(c_dir_path, .{});
defer c_dir.close();

View File

@ -32,6 +32,8 @@ const Allocator = std.mem.Allocator;
const File = std.fs.File;
const EnvMap = std.process.EnvMap;
const PreExecFn = fn (*Command) void;
/// Path to the command to run. This must be an absolute path. This
/// library does not do PATH lookup.
path: []const u8,
@ -55,7 +57,10 @@ stderr: ?File = null,
/// If set, this will be executed /in the child process/ after fork but
/// before exec. This is useful to setup some state in the child before the
/// exec process takes over, such as signal handlers, setsid, setuid, etc.
pre_exec: ?fn (*Command) void = null,
pre_exec: switch (builtin.zig_backend) {
.stage1 => ?PreExecFn,
else => ?*const PreExecFn,
} = null,
/// User data that is sent to the callback. Set with setData and getData
/// for a more user-friendly API.

View File

@ -587,5 +587,5 @@ test "GridSize update rounding" {
try testing.expectEqual(@as(GridSize.Unit, 2), grid.rows);
}
const face_ttf = @embedFile("../fonts/FiraCode-Regular.ttf");
const face_bold_ttf = @embedFile("../fonts/FiraCode-Bold.ttf");
const face_ttf = @embedFile("font/res/FiraCode-Regular.ttf");
const face_bold_ttf = @embedFile("font/res/FiraCode-Bold.ttf");

View File

@ -161,4 +161,4 @@ test {
}
}
const testFont = @embedFile("../../fonts/Inconsolata-Regular.ttf");
const testFont = @embedFile("res/Inconsolata-Regular.ttf");

View File

@ -1,2 +1,2 @@
pub const fontRegular = @embedFile("../../fonts/Inconsolata-Regular.ttf");
pub const fontBold = @embedFile("../../fonts/Inconsolata-Bold.ttf");
pub const fontRegular = @embedFile("res/Inconsolata-Regular.ttf");
pub const fontBold = @embedFile("res/Inconsolata-Bold.ttf");

View File

@ -210,13 +210,13 @@ pub const Parser = struct {
'B' => {
self.state = .semantic_option_start;
self.command = .{ .prompt_end = .{} };
self.command = .{ .prompt_end = {} };
self.complete = true;
},
'C' => {
self.state = .semantic_option_start;
self.command = .{ .end_of_input = .{} };
self.command = .{ .end_of_input = {} };
self.complete = true;
},