mirror of
https://github.com/ziglang/zig.git
synced 2026-01-14 11:25:14 +00:00
stage2: fix crash when using stage1 backend
Calling processOutdatedAndDeletedDecls() should not happen when using the stage1 backend. Problem solved with checking a simple flag.
This commit is contained in:
parent
960932a4bf
commit
2beb21c4e4
@ -1952,9 +1952,13 @@ pub fn performAllTheWork(self: *Compilation) error{ TimerUnsupported, OutOfMemor
|
||||
}
|
||||
}
|
||||
|
||||
// Iterate over all the files and look for outdated and deleted declarations.
|
||||
if (self.bin_file.options.module) |mod| {
|
||||
try mod.processOutdatedAndDeletedDecls();
|
||||
const use_stage1 = build_options.omit_stage2 or
|
||||
(build_options.is_stage1 and self.bin_file.options.use_llvm);
|
||||
if (!use_stage1) {
|
||||
// Iterate over all the files and look for outdated and deleted declarations.
|
||||
if (self.bin_file.options.module) |mod| {
|
||||
try mod.processOutdatedAndDeletedDecls();
|
||||
}
|
||||
}
|
||||
|
||||
while (self.work_queue.readItem()) |work_item| switch (work_item) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user