| author | |
| committer | |
| log | 0cbf00a3ec3f6640556e39efaa6e936b0b42630b |
| tree | c0bc74564724f5aed82506e7fb991f6e99a746c0 |
| parent | 010494d8af69ecbb14619ebab177c32a074b69e5 |
| signature |
3 files changed, 14 insertions(+), 4 deletions(-)
build.zig+4-1| ... | ... | @@ -74,7 +74,7 @@ pub fn build(b: *Builder) !void { |
| 74 | 74 | const skip_libc = b.option(bool, "skip-libc", "Main test suite skips tests that link libc") orelse false; |
| 75 | 75 | const skip_self_hosted = b.option(bool, "skip-self-hosted", "Main test suite skips building self hosted compiler") orelse false; |
| 76 | 76 | if (!skip_self_hosted and builtin.os == .linux) { |
| 77 | // TODO evented I/O other OS'spu | |
| 77 | // TODO evented I/O other OS's | |
| 78 | 78 | test_step.dependOn(&exe.step); |
| 79 | 79 | } |
| 80 | 80 | |
| ... | ... | @@ -232,6 +232,9 @@ fn findLLVM(b: *Builder, llvm_config_exe: []const u8) !LibraryDep { |
| 232 | 232 | if (fs.path.isAbsolute(lib_arg)) { |
| 233 | 233 | try result.libs.append(lib_arg); |
| 234 | 234 | } else { |
| 235 | if (mem.endsWith(u8, lib_arg, ".lib")) { | |
| 236 | lib_arg = lib_arg[0 .. lib_arg.len - 4]; | |
| 237 | } | |
| 235 | 238 | try result.system_libs.append(lib_arg); |
| 236 | 239 | } |
| 237 | 240 | } |
src-self-hosted/compilation.zig+3| ... | ... | @@ -517,6 +517,9 @@ pub const Compilation = struct { |
| 517 | 517 | comp.target_layout_str = llvm.CopyStringRepOfTargetData(comp.target_data_ref) orelse return error.OutOfMemory; |
| 518 | 518 | defer llvm.DisposeMessage(comp.target_layout_str); |
| 519 | 519 | |
| 520 | comp.events = try allocator.create(event.Channel(Event)); | |
| 521 | defer allocator.destroy(comp.events); | |
| 522 | ||
| 520 | 523 | comp.events.init([0]Event{}); |
| 521 | 524 | defer comp.events.deinit(); |
| 522 | 525 |
src-self-hosted/test.zig+7-3| ... | ... | @@ -13,12 +13,16 @@ test "stage2" { |
| 13 | 13 | // TODO provide a way to run tests in evented I/O mode |
| 14 | 14 | if (!std.io.is_async) return error.SkipZigTest; |
| 15 | 15 | |
| 16 | // TODO https://github.com/ziglang/zig/issues/1364 | |
| 17 | // TODO https://github.com/ziglang/zig/issues/3117 | |
| 18 | if (true) return error.SkipZigTest; | |
| 19 | ||
| 16 | 20 | try ctx.init(); |
| 17 | 21 | defer ctx.deinit(); |
| 18 | 22 | |
| 19 | 23 | try @import("stage2_tests").addCases(&ctx); |
| 20 | 24 | |
| 21 | _ = async ctx.run(); | |
| 25 | try ctx.run(); | |
| 22 | 26 | } |
| 23 | 27 | |
| 24 | 28 | const file1 = "1.zig"; |
| ... | ... | @@ -61,8 +65,8 @@ pub const TestContext = struct { |
| 61 | 65 | self.zig_compiler.deinit(); |
| 62 | 66 | } |
| 63 | 67 | |
| 64 | fn run(self: *TestContext) void { | |
| 65 | std.event.Loop.instance.?.startCpuBoundOperation(); | |
| 68 | fn run(self: *TestContext) !void { | |
| 69 | std.event.Loop.startCpuBoundOperation(); | |
| 66 | 70 | self.any_err = self.group.wait(); |
| 67 | 71 | return self.any_err; |
| 68 | 72 | } |