From d03fcc73fc7083558915f6c170432fce8fb84993 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 23 Sep 2020 09:56:30 -0700 Subject: stage2: implement --main-pkg-path --- src/Compilation.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index be26a400c2..656baa898b 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2248,10 +2248,12 @@ fn updateStage1Module(comp: *Compilation) !void { comp.stage1_cache_hash = &ch; + const main_pkg_path = mod.root_pkg.root_src_directory.path orelse ""; + const stage1_module = stage1.create( @enumToInt(comp.bin_file.options.optimize_mode), - undefined, - 0, // TODO --main-pkg-path + main_pkg_path.ptr, + main_pkg_path.len, main_zig_file.ptr, main_zig_file.len, zig_lib_dir.ptr, -- cgit v1.2.3