diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-12-19 18:53:31 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-12-19 18:54:35 +0100 |
commit | a599959a61e2a9ae313b851b2b63c0a2b97d3cb5 (patch) | |
tree | ce0b3346b48df0926560c305394ff04b86fcccb3 /content/2022-07-07-llvm-orc-jit/index.md | |
parent | 34fe7e1b93f73dc8ffb42cc172f4a9966453faa9 (diff) | |
download | blog-a599959a61e2a9ae313b851b2b63c0a2b97d3cb5.tar.gz blog-a599959a61e2a9ae313b851b2b63c0a2b97d3cb5.zip |
llvm-orc-jit: migrate to llvm17
Diffstat (limited to 'content/2022-07-07-llvm-orc-jit/index.md')
-rw-r--r-- | content/2022-07-07-llvm-orc-jit/index.md | 13 |
1 files changed, 10 insertions, 3 deletions
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 |