[llvm-bugs] [Bug 48938] New: lli with -jit-kind=orc-lazy can't symbol 'atexit' for c++ program
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jan 29 03:03:05 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48938
Bug ID: 48938
Summary: lli with -jit-kind=orc-lazy can't symbol 'atexit' for
c++ program
Product: tools
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: lli
Assignee: unassignedbugs at nondot.org
Reporter: harry.linxd at gmail.com
CC: llvm-bugs at lists.llvm.org
$ cat main.cpp
```
#include <iostream>
int main(int argc, char** argv) {
std::cout << "hi c++ from jit: " << argv[0] << std::endl;
return 0;
}
```
Compile with 'no-use-cxa-atexit'
$ clang++ -S -emit-llvm main.cpp -stdlib=libstdc++ -fno-use-cxa-atexit
the 'main.ll' load fine with lli 'orc-mcjit' and 'mcjit'
$ lli --jit-kind=orc-mcjit ./main.ll
hi c++ from jit: ./main.ll
$lli --jit-kind=mcjit ./main.ll
hi c++ from jit: ./main.ll
while with orc-lazy, I get undefined symbol
$lli --jit-kind=orc-lazy ./main.ll
JIT session error: Symbols not found: [ atexit ]
JIT session error: Failed to materialize symbols: { (0x23e0c50, {
__orc_lcl.__cxx_global_var_init.0, _GLOBAL__sub_I_main.cpp }) }
The issue can be found on both clang10 and clang11.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210129/0a74eb61/attachment.html>
More information about the llvm-bugs
mailing list