From dfca41ad4c64b34555b9127cab2c00f3d23b2c31 Mon Sep 17 00:00:00 2001 From: Santeri Hannula Date: Thu, 14 Nov 2024 16:23:11 +0200 Subject: [PATCH] docs: update sanitizers section in `INSTALL.md` --- INSTALL.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 00bc2798ae..1fb1c74175 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -35,19 +35,19 @@ pro hand -p true -s false -n false SIGSEGV ### Sanitizers -Musl does not have proper sanitizer support, so until we support native (GNU) linux builds, these are limited to mac only. +Sanitizers are supported for native builds only and you need to have `llvm-18` (and `clang-18` on linux) installed on your machine. -In order to use address sanitizer (`-Dasan`) and undefined behavior sanitizer (`-Dubsan`), you need to have version 18 of llvm installed on your machine. You also have to build natively, since cross-compilation is not supported. +For native linux builds this is the only situation where we actually build against the native abi. Normally we build agains musl even on native gnu machines. macOS: ```terminal brew install llvm@18 ``` - - - - +Ubuntu: +```terminal +apt-get install llvm-18 clang-18 +``` ## Build @@ -96,10 +96,10 @@ Provide additional compiler flags. These propagate to all build artifacts. Example: `zig build -Dcopt="-g" -Dcopt="-fno-sanitize=all"` #### `-Dasan` -Enable address sanitizer. Only supported in native macos builds. Requires llvm 18, see [prerequisites](#sanitizers). +Enable address sanitizer. Only supported nativelly. Requires `llvm@18`, see [prerequisites](#sanitizers). #### `-Dubsan` -Enable undefined behavior sanitizer. Only supported in native macos builds. Requires llvm 18, see [prerequisites](#sanitizers). +Enable undefined behavior sanitizer. Only supported nativelly. Requires `llvm@18`, see [prerequisites](#sanitizers).