Skip to content

anoopelias/llvm-trials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLVM Trials

This repo has some code to show the stages of compilation in LLVM. The findings are summarized in the blog post here.

Run

$ make run
rm -f main.ll main.o main.s util.ll util.o util.s main.wasm main
clang -S -emit-llvm \
		-o main.ll main.c
llc -filetype=obj main.ll
clang -S -emit-llvm \
		-o util.ll util.c
llc -filetype=obj util.ll
ld -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk \
		-o main \
		main.o util.o \
		-lSystem /opt/homebrew/Cellar/llvm/16.0.6/lib/clang/16/lib/darwin/libclang_rt.osx.a \

./main
Hello, clang 15

About

Some experiments with LLVM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published