aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorMeghan <hello@nektro.net>2022-06-14 14:36:19 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-07-28 15:19:17 -0700
commit02acde99a142e89c30d0e49cc703d0ad80ea31b7 (patch)
treeb2d8947ba58790dd1e55c48dd6ee01123294f9e7 /src/Sema.zig
parent0fc79d602bf9b3a5c97cfc28b59193b005692cb2 (diff)
downloadzig-02acde99a142e89c30d0e49cc703d0ad80ea31b7.tar.gz
zig-02acde99a142e89c30d0e49cc703d0ad80ea31b7.zip
stage2: ensure 'std', 'builtin', and 'root' is always available to `@import`
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index ad8beff0f3..ac9e24a9be 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -4674,10 +4674,6 @@ fn zirCImport(sema: *Sema, parent_block: *Block, inst: Zir.Inst.Index) CompileEr
error.OutOfMemory => return error.OutOfMemory,
else => unreachable, // we pass null for root_src_dir_path
};
- const std_pkg = mod.main_pkg.table.get("std").?;
- const builtin_pkg = mod.main_pkg.table.get("builtin").?;
- try c_import_pkg.add(sema.gpa, "builtin", builtin_pkg);
- try c_import_pkg.add(sema.gpa, "std", std_pkg);
const result = mod.importPkg(c_import_pkg) catch |err|
return sema.fail(&child_block, src, "C import failed: {s}", .{@errorName(err)});