aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/2022-07-07-llvm-orc-jit/Makefile
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2023-12-19 18:53:31 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2023-12-19 18:54:35 +0100
commita599959a61e2a9ae313b851b2b63c0a2b97d3cb5 (patch)
treece0b3346b48df0926560c305394ff04b86fcccb3 /content/2022-07-07-llvm-orc-jit/Makefile
parent34fe7e1b93f73dc8ffb42cc172f4a9966453faa9 (diff)
downloadblog-a599959a61e2a9ae313b851b2b63c0a2b97d3cb5.tar.gz
blog-a599959a61e2a9ae313b851b2b63c0a2b97d3cb5.zip
llvm-orc-jit: migrate to llvm17
Diffstat (limited to 'content/2022-07-07-llvm-orc-jit/Makefile')
-rw-r--r--content/2022-07-07-llvm-orc-jit/Makefile30
1 files changed, 11 insertions, 19 deletions
diff --git a/content/2022-07-07-llvm-orc-jit/Makefile b/content/2022-07-07-llvm-orc-jit/Makefile
index d292bf1..793d9db 100644
--- a/content/2022-07-07-llvm-orc-jit/Makefile
+++ b/content/2022-07-07-llvm-orc-jit/Makefile
@@ -1,27 +1,19 @@
-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
+run: BUILD/main
./$^
-main: main.o
- $(CXX) -o $@ $^ $(LIBS) $(FLAGS)
+BUILD/main: BUILD/CMakeCache.txt main.cc jit.h ccompiler.h
+ ninja -C BUILD
-%.o: %.cc
- $(CXX) -o $@ -c $^ $(CXXFLAGS) $(FLAGS)
+BUILD/CMakeCache.txt: CMakeLists.txt
+ # When building against a specific LLVM/CLANG build use
+ # -DCLANG_INSTALL_PREFIX=<PATH>
+ # to configure the root of the installation.
+ cmake -B BUILD -S . -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=1
+ ln -sfn BUILD/compile_commands.json
+ touch $@
fmt:
clang-format -i *.cc *.h
clean:
- $(RM) main *.o
+ $(RM) -r BUILD compile_commands.json