Skip to content

Commit 1c9a154

Browse files
committed
Fixed link process not finishing
1 parent fb9c72c commit 1c9a154

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Libs/Backends/LLVM/Compiler/Src/LLVMBackend/Linker.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,14 @@ namespace rift::compiler::LLVM
7070
command.Add(outParam.data());
7171

7272
Log::Info("Linking '{}' from '{}'", p::ToString(filePath), irModule.objectFile);
73-
p::RunProcess(command,
74-
SubprocessOptions::TerminateIfDestroyed | SubprocessOptions::CombinedOutErr);
73+
auto process = p::RunProcess(command,
74+
SubprocessOptions::TerminateIfDestroyed | SubprocessOptions::CombinedOutErr);
75+
i32 returnCode = 0;
76+
p::WaitProcess(process.TryGet(), &returnCode);
77+
if (returnCode != 0)
78+
{
79+
compiler.AddError("Linking failed");
80+
}
7581
}
7682
}
7783
}

0 commit comments

Comments
 (0)