https://github.com/sonsongithub/llvm_jit_compile
Try to "Just In Time" compile using LLVM.
https://github.com/sonsongithub/llvm_jit_compile
Last synced: about 1 year ago
JSON representation
Try to "Just In Time" compile using LLVM.
- Host: GitHub
- URL: https://github.com/sonsongithub/llvm_jit_compile
- Owner: sonsongithub
- License: mit
- Created: 2020-01-26T05:23:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-13T09:09:20.000Z (almost 5 years ago)
- Last Synced: 2025-04-23T23:14:07.468Z (about 1 year ago)
- Language: C++
- Size: 144 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llvm_jit_compile
Try to "Just In Time" compile using LLVM.
# Requirement
LLVM, you can install it mac brew. https://llvm.org
# How compile
You have to specify include and library paths when compiling and linking.
It's easy to use `llvm-config`.
## Example
```
LLVM_CONFIG=/usr/local/opt/llvm/bin/llvm-config
clang++ -c ./main.cpp -o ./main.o `${LLVM_CONFIG} --cxxflags`
clang++ -o ./a.out ./main.o `${LLVM_CONFIG} --ldflags --libs --libfiles --system-libs`
./a.out
```
## Visual Studio code
```
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"`/usr/local/opt/llvm/bin/llvm-config", "--cxxflags`",
"`/usr/local/opt/llvm/bin/llvm-config", "--ldflags", "--libs", "--libfiles", "--system-libs`"
],
```