diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-09-23 09:56:30 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-09-23 09:56:30 -0700 |
| commit | d03fcc73fc7083558915f6c170432fce8fb84993 (patch) | |
| tree | 106c14aad3ac777dd9e41426cf8606ddaa747ff8 /src/Compilation.zig | |
| parent | 15b2bae517c54db22604eb303645d2f0023768e0 (diff) | |
| download | zig-d03fcc73fc7083558915f6c170432fce8fb84993.tar.gz zig-d03fcc73fc7083558915f6c170432fce8fb84993.zip | |
stage2: implement --main-pkg-path
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 4 insertions, 2 deletions
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, |
