https://github.com/tzhenghao/llvm-tutorial
Code for LLVM's official tutorial
https://github.com/tzhenghao/llvm-tutorial
compiler cpp llvm
Last synced: 5 months ago
JSON representation
Code for LLVM's official tutorial
- Host: GitHub
- URL: https://github.com/tzhenghao/llvm-tutorial
- Owner: tzhenghao
- License: mit
- Created: 2023-09-20T05:08:30.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-10-01T06:32:56.000Z (over 2 years ago)
- Last Synced: 2024-02-17T06:26:17.384Z (over 2 years ago)
- Topics: compiler, cpp, llvm
- Language: C++
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llvm-tutorial
Code for LLVM's official tutorial
## Instructions
### CMake (recommended)
1. Navigate to the `build` directory: `cd build`
2. Configure and generate build files with CMake (via Ninja): `cmake .. -G Ninja`
3. Build with Ninja: `ninja`
### Manual (with clang)
```cpp
clang++ -g -O3 main.cpp `llvm-config-16 --cxxflags --ldflags --system-libs --libs core` -o toy
```