| ... | @@ -4228,6 +4228,10 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi | ... | @@ -4228,6 +4228,10 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi |
| 4228 | .root_src_path = "build_runner.zig", | 4228 | .root_src_path = "build_runner.zig", |
| 4229 | }; | 4229 | }; |
| 4230 | | 4230 | |
| | 4231 | var build_pkg: Package = .{ |
| | 4232 | .root_src_directory = build_directory, |
| | 4233 | .root_src_path = build_zig_basename, |
| | 4234 | }; |
| 4231 | if (!build_options.omit_pkg_fetching_code) { | 4235 | if (!build_options.omit_pkg_fetching_code) { |
| 4232 | var http_client: std.http.Client = .{ .allocator = gpa }; | 4236 | var http_client: std.http.Client = .{ .allocator = gpa }; |
| 4233 | defer http_client.deinit(); | 4237 | defer http_client.deinit(); |
| ... | @@ -4249,7 +4253,8 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi | ... | @@ -4249,7 +4253,8 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi |
| 4249 | | 4253 | |
| 4250 | // Here we borrow main package's table and will replace it with a fresh | 4254 | // Here we borrow main package's table and will replace it with a fresh |
| 4251 | // one after this process completes. | 4255 | // one after this process completes. |
| 4252 | main_pkg.fetchAndAddDependencies( | 4256 | build_pkg.fetchAndAddDependencies( |
| | 4257 | &main_pkg, |
| 4253 | arena, | 4258 | arena, |
| 4254 | &thread_pool, | 4259 | &thread_pool, |
| 4255 | &http_client, | 4260 | &http_client, |
| ... | @@ -4280,11 +4285,6 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi | ... | @@ -4280,11 +4285,6 @@ pub fn cmdBuild(gpa: Allocator, arena: Allocator, args: []const []const u8) !voi |
| 4280 | mem.swap(Package.Table, &main_pkg.table, &deps_pkg.table); | 4285 | mem.swap(Package.Table, &main_pkg.table, &deps_pkg.table); |
| 4281 | try main_pkg.add(gpa, "@dependencies", deps_pkg); | 4286 | try main_pkg.add(gpa, "@dependencies", deps_pkg); |
| 4282 | } | 4287 | } |
| 4283 | | | |
| 4284 | var build_pkg: Package = .{ | | |
| 4285 | .root_src_directory = build_directory, | | |
| 4286 | .root_src_path = build_zig_basename, | | |
| 4287 | }; | | |
| 4288 | try main_pkg.add(gpa, "@build", &build_pkg); | 4288 | try main_pkg.add(gpa, "@build", &build_pkg); |
| 4289 | | 4289 | |
| 4290 | const comp = Compilation.create(gpa, .{ | 4290 | const comp = Compilation.create(gpa, .{ |