[llvm] [lli] Honor --jit-linker-kind=rtdyld on platforms that default to jitlink (PR #167860)
Stefan Gränitz via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 8 01:02:42 PST 2025
================
@@ -1161,18 +1170,10 @@ static int runOrcJIT(const char *ProgName) {
}
// Resolve and run the main function.
+ using MainFnTy = int(int, char *[]);
auto MainAddr = ExitOnErr(J->lookup(EntryFunc));
- int Result;
-
- if (EPC) {
- // ExecutorProcessControl-based execution with JITLink.
- Result = ExitOnErr(EPC->runAsMain(MainAddr, InputArgv));
- } else {
- // Manual in-process execution with RuntimeDyld.
- using MainFnTy = int(int, char *[]);
- auto MainFn = MainAddr.toPtr<MainFnTy *>();
- Result = orc::runAsMain(MainFn, InputArgv, StringRef(InputFile));
- }
+ auto MainFn = MainAddr.toPtr<MainFnTy *>();
+ int Result = orc::runAsMain(MainFn, InputArgv, StringRef(InputFile));
----------------
weliveindetail wrote:
It only looks like that, but we never implemented it. `launchRemote()` is only wired up in the MCJIT case: https://github.com/llvm/llvm-project/blob/907e8514b188abb0e4d4d16b1e0e847a163762cd/llvm/tools/lli/lli.cpp#L705-L706 I think it's better to take this change and avoid future misunderstandings.
https://github.com/llvm/llvm-project/pull/167860
More information about the llvm-commits
mailing list