Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zag-research/zig-llvm
Quick guide to compiling LLVM & Zig source files
https://github.com/zag-research/zig-llvm
compilation llvm zig
Last synced: 30 days ago
JSON representation
Quick guide to compiling LLVM & Zig source files
- Host: GitHub
- URL: https://github.com/zag-research/zig-llvm
- Owner: Zag-Research
- Created: 2024-04-30T15:51:21.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-16T13:53:06.000Z (6 months ago)
- Last Synced: 2024-10-15T17:37:28.211Z (30 days ago)
- Topics: compilation, llvm, zig
- Language: Zig
- Homepage:
- Size: 48.2 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### Compiling
The `builder_test` folder contains simple functions to test the LLVM IR builder from within Zig.
To execute, you'll need to download LLVM from source and provide the necessary compiler flags
Example of how to execute is shown below (might need to change path to LLVM headers and library files):
```bash
# Run from WSL
zig build-exe main.zig -lc++ -I/usr/lib/llvm-14/include -L /usr/lib/llvm-14/lib -lLLVM-14
```The `link_test` folder contains simple functions to test linking LLVM IR with a zig file.
To execute:
```bash
clang -c add.ll -o add.o
zig build-exe main.zig add.o -femit-bin=main
./main.o
```The `ll_output_test` folder contains a simple .c and .zig file. In
order to link the two together, see the README in that folder