commit ade85471e2cdab466ba685a38c2c7949c9dd1632 (tree)
parent d94252496e6622189fca72ad6d6b17db0dcb2e03
Author: Dimenus <ryan.saunderson88@gmail.com>
Date: Fri, 6 Aug 2021 12:18:20 -0500
include builtin & std packages in all defined packages
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/Compilation.zig b/src/Compilation.zig
@@ -1227,6 +1227,12 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
} else main_pkg;
errdefer if (options.is_test) root_pkg.destroy(gpa);
+ var other_pkg_iter = main_pkg.table.valueIterator();
+ while (other_pkg_iter.next()) |pkg| {
+ try pkg.*.add(gpa, "builtin", builtin_pkg);
+ try pkg.*.add(gpa, "std", std_pkg);
+ }
+
try main_pkg.addAndAdopt(gpa, "builtin", builtin_pkg);
try main_pkg.add(gpa, "root", root_pkg);
try main_pkg.addAndAdopt(gpa, "std", std_pkg);