diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-11-05 23:24:05 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2022-11-05 23:24:05 +0100 |
commit | b14fce113fa45da85c8c3528552ae446ced340ca (patch) | |
tree | 5e7a68d113f8b4e3649a2c9cbcd5cd85442d0052 /content/2022-07-07-llvm-orc-jit/Makefile | |
parent | cfaa38627b3d315d47ddad295962fe0c92d74b84 (diff) | |
download | blog-b14fce113fa45da85c8c3528552ae446ced340ca.tar.gz blog-b14fce113fa45da85c8c3528552ae446ced340ca.zip |
llvm: small ORCv2 jit example
Diffstat (limited to 'content/2022-07-07-llvm-orc-jit/Makefile')
-rw-r--r-- | content/2022-07-07-llvm-orc-jit/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/content/2022-07-07-llvm-orc-jit/Makefile b/content/2022-07-07-llvm-orc-jit/Makefile new file mode 100644 index 0000000..d292bf1 --- /dev/null +++ b/content/2022-07-07-llvm-orc-jit/Makefile @@ -0,0 +1,27 @@ +LIBS = $(shell llvm-config --libs) +LIBS += -lclang-cpp + +CXXFLAGS = -Wall -Wextra -Werror +CXXFLAGS += -O0 +CXXFLAGS += -g +CXXFLAGS += -std=c++17 + +SAN ?= 1 +ifeq ($(SAN),1) +FLAGS = -fsanitize=address -fsanitize=leak -fsanitize=undefined +endif + +run: main + ./$^ + +main: main.o + $(CXX) -o $@ $^ $(LIBS) $(FLAGS) + +%.o: %.cc + $(CXX) -o $@ -c $^ $(CXXFLAGS) $(FLAGS) + +fmt: + clang-format -i *.cc *.h + +clean: + $(RM) main *.o |