diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Builtin.zig | 12 | ||||
| -rw-r--r-- | src/Compilation.zig | 2 | ||||
| -rw-r--r-- | src/Compilation/Config.zig | 3 | ||||
| -rw-r--r-- | src/Module.zig | 13 | ||||
| -rw-r--r-- | src/Package/Module.zig | 1 | ||||
| -rw-r--r-- | src/main.zig | 18 |
6 files changed, 8 insertions, 41 deletions
diff --git a/src/Builtin.zig b/src/Builtin.zig index 3211dd3a69..fb0c1e9490 100644 --- a/src/Builtin.zig +++ b/src/Builtin.zig @@ -3,7 +3,6 @@ zig_backend: std.builtin.CompilerBackend, output_mode: std.builtin.OutputMode, link_mode: std.builtin.LinkMode, is_test: bool, -test_evented_io: bool, single_threaded: bool, link_libc: bool, link_libcpp: bool, @@ -222,17 +221,6 @@ pub fn append(opts: @This(), buffer: *std.ArrayList(u8)) Allocator.Error!void { \\pub var test_functions: []const std.builtin.TestFn = undefined; // overwritten later \\ ); - if (opts.test_evented_io) { - try buffer.appendSlice( - \\pub const test_io_mode = .evented; - \\ - ); - } else { - try buffer.appendSlice( - \\pub const test_io_mode = .blocking; - \\ - ); - } } } diff --git a/src/Compilation.zig b/src/Compilation.zig index d2ed241960..8d7d3ea8b1 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1613,7 +1613,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil hash.add(options.config.use_lib_llvm); hash.add(options.config.dll_export_fns); hash.add(options.config.is_test); - hash.add(options.config.test_evented_io); hash.addOptionalBytes(options.test_filter); hash.addOptionalBytes(options.test_name_prefix); hash.add(options.skip_linker_dependencies); @@ -2476,7 +2475,6 @@ fn addNonIncrementalStuffToCacheManifest( try addModuleTableToCacheHash(gpa, arena, &man.hash, mod.root_mod, mod.main_mod, .{ .files = man }); // Synchronize with other matching comments: ZigOnlyHashStuff - man.hash.add(comp.config.test_evented_io); man.hash.addOptionalBytes(comp.test_filter); man.hash.addOptionalBytes(comp.test_name_prefix); man.hash.add(comp.skip_linker_dependencies); diff --git a/src/Compilation/Config.zig b/src/Compilation/Config.zig index 78273f66e4..2f6422b28a 100644 --- a/src/Compilation/Config.zig +++ b/src/Compilation/Config.zig @@ -54,7 +54,6 @@ import_memory: bool, export_memory: bool, shared_memory: bool, is_test: bool, -test_evented_io: bool, debug_format: DebugFormat, root_strip: bool, root_error_tracing: bool, @@ -104,7 +103,6 @@ pub const Options = struct { import_memory: ?bool = null, export_memory: ?bool = null, shared_memory: ?bool = null, - test_evented_io: bool = false, debug_format: ?DebugFormat = null, dll_export_fns: ?bool = null, rdynamic: ?bool = null, @@ -477,7 +475,6 @@ pub fn resolve(options: Options) ResolveError!Config { .output_mode = options.output_mode, .have_zcu = options.have_zcu, .is_test = options.is_test, - .test_evented_io = options.test_evented_io, .link_mode = link_mode, .link_libc = link_libc, .link_libcpp = link_libcpp, diff --git a/src/Module.zig b/src/Module.zig index b51ceda1a9..d332c4db53 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -5620,10 +5620,6 @@ pub fn populateTestFunctions( } const decl = mod.declPtr(decl_index); const test_fn_ty = decl.ty.slicePtrFieldType(mod).childType(mod); - const null_usize = try mod.intern(.{ .opt = .{ - .ty = try mod.intern(.{ .opt_type = .usize_type }), - .val = .none, - } }); const array_decl_index = d: { // Add mod.test_functions to an array decl then make the test_functions @@ -5631,11 +5627,6 @@ pub fn populateTestFunctions( const test_fn_vals = try gpa.alloc(InternPool.Index, mod.test_functions.count()); defer gpa.free(test_fn_vals); - // Add a dependency on each test name and function pointer. - var array_decl_dependencies = std.ArrayListUnmanaged(Decl.Index){}; - defer array_decl_dependencies.deinit(gpa); - try array_decl_dependencies.ensureUnusedCapacity(gpa, test_fn_vals.len * 2); - for (test_fn_vals, mod.test_functions.keys()) |*test_fn_val, test_decl_index| { const test_decl = mod.declPtr(test_decl_index); // TODO: write something like getCoercedInts to avoid needing to dupe @@ -5655,8 +5646,6 @@ pub fn populateTestFunctions( }); break :n test_name_decl_index; }; - array_decl_dependencies.appendAssumeCapacity(test_decl_index); - array_decl_dependencies.appendAssumeCapacity(test_name_decl_index); try mod.linkerUpdateDecl(test_name_decl_index); const test_fn_fields = .{ @@ -5682,8 +5671,6 @@ pub fn populateTestFunctions( } }), .addr = .{ .decl = test_decl_index }, } }), - // async_frame_size - null_usize, }; test_fn_val.* = try mod.intern(.{ .aggregate = .{ .ty = test_fn_ty.toIntern(), diff --git a/src/Package/Module.zig b/src/Package/Module.zig index 66d5a21eab..6fadbf1dd5 100644 --- a/src/Package/Module.zig +++ b/src/Package/Module.zig @@ -349,7 +349,6 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module { .output_mode = options.global.output_mode, .link_mode = options.global.link_mode, .is_test = options.global.is_test, - .test_evented_io = options.global.test_evented_io, .single_threaded = single_threaded, .link_libc = options.global.link_libc, .link_libcpp = options.global.link_libcpp, diff --git a/src/main.zig b/src/main.zig index b6463489bc..1a9c264b7d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -29,27 +29,27 @@ const AstGen = @import("AstGen.zig"); const mingw = @import("mingw.zig"); const Server = std.zig.Server; -pub const std_options = struct { - pub const wasiCwd = wasi_cwd; - pub const logFn = log; - pub const enable_segfault_handler = false; +pub const std_options = .{ + .wasiCwd = wasi_cwd, + .logFn = log, + .enable_segfault_handler = false, - pub const log_level: std.log.Level = switch (builtin.mode) { + .log_level = switch (builtin.mode) { .Debug => .debug, .ReleaseSafe, .ReleaseFast => .info, .ReleaseSmall => .err, - }; + }, }; // Crash report needs to override the panic handler pub const panic = crash_report.panic; var wasi_preopens: fs.wasi.Preopens = undefined; -pub fn wasi_cwd() fs.Dir { +pub fn wasi_cwd() std.os.wasi.fd_t { // Expect the first preopen to be current working directory. const cwd_fd: std.os.fd_t = 3; assert(mem.eql(u8, wasi_preopens.names[cwd_fd], ".")); - return .{ .fd = cwd_fd }; + return cwd_fd; } fn getWasiPreopen(name: []const u8) Compilation.Directory { @@ -1335,8 +1335,6 @@ fn buildOutputType( create_module.each_lib_rpath = false; } else if (mem.eql(u8, arg, "--test-cmd-bin")) { try test_exec_args.append(null); - } else if (mem.eql(u8, arg, "--test-evented-io")) { - create_module.opts.test_evented_io = true; } else if (mem.eql(u8, arg, "--test-no-exec")) { test_no_exec = true; } else if (mem.eql(u8, arg, "-ftime-report")) { |
