diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-04-08 11:29:31 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-04-08 11:29:31 -0700 |
| commit | b9e508c410cd077d704a73418281f6d7839df241 (patch) | |
| tree | 1ec79de1aebed48460a5e87170a7cbbce99c0dcd /src/main.zig | |
| parent | a483e38df62f73dc0cdadee6faf3e083094210d4 (diff) | |
| download | zig-b9e508c410cd077d704a73418281f6d7839df241.tar.gz zig-b9e508c410cd077d704a73418281f6d7839df241.zip | |
stage2: revert to only has_decl and export ZIR support
Reverting most of the code from the previous commits in this branch.
Will pull in the code with modifications bit by bit.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig index 0f03813a36..5fb74db61f 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1732,8 +1732,6 @@ fn buildOutputType( }, } - // This gets cleaned up, because root_pkg becomes part of the - // package table of the start_pkg. const root_pkg: ?*Package = if (root_src_file) |src_path| blk: { if (main_pkg_path) |p| { const rel_src_path = try fs.path.relative(gpa, p, src_path); @@ -1743,6 +1741,7 @@ fn buildOutputType( break :blk try Package.create(gpa, fs.path.dirname(src_path), fs.path.basename(src_path)); } } else null; + defer if (root_pkg) |p| p.destroy(gpa); // Transfer packages added with --pkg-begin/--pkg-end to the root package if (root_pkg) |pkg| { |
