From 7b8cb881df7e034a8626caabf355055ee81a0fef Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 23 Jul 2021 22:23:03 -0700 Subject: stage2: improvements towards `zig test` * There is now a main_pkg in addition to root_pkg. They are usually the same. When using `zig test`, main_pkg is the user's source file and root_pkg has the test runner. * scanDecl no longer looks for test decls outside the package being tested. honoring `--test-filter` is still TODO. * test runner main function has a void return value rather than `anyerror!void` * Sema is improved to generate better AIR for for loops on slices. * Sema: fix incorrect capacity calculation in zirBoolBr * Sema: add compile errors for trying to use slice fields as an lvalue. * Sema: fix type coercion for error unions * Sema: fix analyzeVarRef generating garbage AIR * C codegen: fix renderValue for error unions with 0 bit payload * C codegen: implement function pointer calls * CLI: fix usage text Adds 4 new AIR instructions: * slice_len, slice_ptr: to get the ptr and len fields of a slice. * slice_elem_val, ptr_slice_elem_val: to get the element value of a slice, and a pointer to a slice. AstGen gains a new functionality: * One of the unused flags of struct decls is now used to indicate structs that are known to have non-zero size based on the AST alone. --- src/glibc.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glibc.zig') diff --git a/src/glibc.zig b/src/glibc.zig index c0afc321c9..1a6756e467 100644 --- a/src/glibc.zig +++ b/src/glibc.zig @@ -943,7 +943,7 @@ fn buildSharedLib( .zig_lib_directory = comp.zig_lib_directory, .target = comp.getTarget(), .root_name = lib.name, - .root_pkg = null, + .main_pkg = null, .output_mode = .Lib, .link_mode = .Dynamic, .thread_pool = comp.thread_pool, -- cgit v1.2.3