From a599959a61e2a9ae313b851b2b63c0a2b97d3cb5 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Tue, 19 Dec 2023 18:53:31 +0100 Subject: llvm-orc-jit: migrate to llvm17 --- content/2022-07-07-llvm-orc-jit/index.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'content/2022-07-07-llvm-orc-jit/index.md') diff --git a/content/2022-07-07-llvm-orc-jit/index.md b/content/2022-07-07-llvm-orc-jit/index.md index 4b2add0..e453f0c 100644 --- a/content/2022-07-07-llvm-orc-jit/index.md +++ b/content/2022-07-07-llvm-orc-jit/index.md @@ -5,6 +5,9 @@ title = "Jit C in memory using LLVM ORC api" tags = ["llvm", "clang", "c++"] +++ +**EDIT**: +- 2023-12-19: Migrate example to `llvm17`. + Based on the in-memory compiler shared in the last post ([C to LLVM IR in memory using libclang](@/2022-06-18-libclang-c-to-llvm-ir/index.md)), this post demonstrates a small *just in time (JIT)* compiler which allows to compile C @@ -31,11 +34,15 @@ The sources are available under [llvm-orc-jit][post-src]. {{ include(path="content/2022-07-07-llvm-orc-jit/ccompiler.h") }} ``` -### Makefile -```make -{{ include(path="content/2022-07-07-llvm-orc-jit/Makefile") }} +### CMakeLists.txt +```cmake +{{ include(path="content/2022-07-07-llvm-orc-jit/CMakeLists.txt") }} ``` +The following [Makefile][post-makefile] provides a convenience wrapper to +configure, build, and run the example with a single `make` invocation. + [post-src]: https://git.memzero.de/blog/tree/content/2022-07-07-llvm-orc-jit?h=main +[post-makefile]: https://git.memzero.de/blog/tree/content/2022-07-07-llvm-orc-jit/Makefile?h=main [src-clang]: https://github.com/llvm/llvm-project/tree/main/clang [blog-clang-in-memory]: https://blog.audio-tk.com/2018/09/18/compiling-c-code-in-memory-with-clang/ [llvm-jit-tut]: https://www.llvm.org/docs/tutorial/BuildingAJIT1.html -- cgit v1.2.3