| ... | @@ -1639,6 +1639,14 @@ pub fn update(self: *Compilation) !void { | ... | @@ -1639,6 +1639,14 @@ pub fn update(self: *Compilation) !void { |
| 1639 | const std_pkg = module.root_pkg.table.get("std").?; | 1639 | const std_pkg = module.root_pkg.table.get("std").?; |
| 1640 | _ = try module.importPkg(std_pkg); | 1640 | _ = try module.importPkg(std_pkg); |
| 1641 | | 1641 | |
| | 1642 | // Normally we rely on importing std to in turn import the root source file |
| | 1643 | // in the start code, but when using the stage1 backend that won't happen, |
| | 1644 | // so in order to run AstGen on the root source file we put it into the |
| | 1645 | // import_table here. |
| | 1646 | if (use_stage1) { |
| | 1647 | _ = try module.importPkg(module.root_pkg); |
| | 1648 | } |
| | 1649 | |
| 1642 | // Put a work item in for every known source file to detect if | 1650 | // Put a work item in for every known source file to detect if |
| 1643 | // it changed, and, if so, re-compute ZIR and then queue the job | 1651 | // it changed, and, if so, re-compute ZIR and then queue the job |
| 1644 | // to update it. | 1652 | // to update it. |