cac03 / llvm-hello-world

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

llvm-hello-world

Prerequisites

At least 15’th versions of clang, llc, lli are required.

Ubuntu 22.04

Run:

# apt-get install clang-15

Then clang would be available as clang-15 llc as llc-15, and lli as lli-15

Arch Linux

# pacman -S clang llvm

To run with interpreter use:

$ make hello-world-run

Other distributions

You have to figure out yourself 🙂

Running

To run as a native executable use:

$ make hello-world-run-executable

To run using an interpreter use:

$ make hello-world-run
Note

In Ubuntu lli, clang, and llc must have version suffix. So you can use make variables to override the default ones.

$ make LLI=lli-15 LLC=llc-15 CLANG=clang-15 hello-world-run

About


Languages

Language:Makefile 70.9%Language:LLVM 29.1%