aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-06 06:21:52 +0200
committerhachem <im@hachem.wtf>2026-09-06 06:21:52 +0200
commit392c49d61fec199605c9cff6e1e2975660e1b846 (patch)
treeab77f5deee5aa993b9bc9224904845af3107203c /README.md
parent9a3a74070be2de9cd58f778e7a6d1df05cb60474 (diff)
feat: migrate over to meson
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 19 insertions, 7 deletions
diff --git a/README.md b/README.md
index 6f17e68..7fbc952 100644
--- a/README.md
+++ b/README.md
@@ -13,21 +13,33 @@ The console lets you type C or C++ directly into the debugger, which LLDB JIT-co
![screenshot](branding/screenshot.png)
## Build
-hsdbg builds on macOS, Linux, and Windows. You'll need [premake5](https://premake.github.io/) and a C++23 compiler. hsdbg links against LLVM/LLDB. By default, it pulls the pinned LLVM release (22.1.0) for your platform. Alternatively, you can point it at an existing LLVM installation that ships the LLDB headers with `LLVM_PREFIX`, or have `llvm-config` available on your `PATH`.
+hsdbg builds on macOS, Linux, and Windows. You'll need [meson](https://mesonbuild.com/), [ninja](https://ninja-build.org/), Python 3, and a C++23 compiler. hsdbg links against LLVM/LLDB. Running `tools/fetch_llvm.py` pulls the pinned LLVM release (22.1.0) for your platform. Alternatively, you can point it at an existing LLVM installation that ships the LLDB headers with `-Dllvm_prefix=<path>` or the `LLVM_PREFIX` environment variable, or have `llvm-config` available on your `PATH`.
```bash
-$ git clone --recursive https://git.hachem.wtf/hachem/hsdbg.git
+$ git clone --recursive https://git.hachem.wtf/hsdbg.git
$ cd hsdbg
-$ premake5 fetch-llvm
-$ premake5 gmake2
-$ make config=dist
+$ python3 tools/fetch_llvm.py
+$ meson setup build --buildtype=release -Db_ndebug=true
+$ ninja -C build
-$ ./bin/dist-macosx/hsdbg ./a.out
+$ ./build/hsdbg ./a.out
```
-The binary lands in `bin/dist-<system>/hsdbg`.
+The binary lands in `build/hsdbg`.
+Each meson build directory is one configuration; set up whichever you need:
+
+```bash
+# debug: symbols, asserts, address + UB sanitizers
+$ meson setup build-debug --buildtype=debug -Db_sanitize=address,undefined
+# release: optimized, asserts still on
+$ meson setup build-release --buildtype=release
+# dist: optimized, asserts off (defines HSDBG_DIST), stripped
+$ meson setup build-dist --buildtype=release -Db_ndebug=true --strip
+```
+
+Build any of them with `ninja -C <dir>`. Two helper targets are also available: `ninja -C <dir> fetch-llvm` re-downloads the pinned LLVM, and `ninja -C <dir> cppcheck` runs static analysis against the generated `compile_commands.json` (analyze a `dist` build dir so cppcheck sees the code without the debug-only asserts and sanitizers).
## License
hsdbg is released under the [MIT License](LICENSE).