From 06d2df4e00c55248b937adf5d3eb384837e8bc34 Mon Sep 17 00:00:00 2001 From: IsaacShelton Date: Sun, 8 Sep 2024 13:43:31 -0500 Subject: [PATCH] Updated HOW_TO_BUILD.md section to more clearly explain LLVM linkage choices --- HOW_TO_BUILD.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/HOW_TO_BUILD.md b/HOW_TO_BUILD.md index 09ecd9e3..5bc99cb9 100644 --- a/HOW_TO_BUILD.md +++ b/HOW_TO_BUILD.md @@ -14,6 +14,7 @@ - `pacman -S mingw-w64-x86_64-gcc --noconfirm` - `pacman -S mingw-w64-x86_64-llvm --noconfirm` - `pacman -S mingw-w64-x86_64-zlib --noconfirm` +- `pacman -S mingw-w64-x86_64-zstd --noconfirm` - `git clone https://github.com/AdeptLanguage/Adept` - `cd Adept` - `mkdir build` @@ -52,13 +53,19 @@ LLVM_DIR=/opt/homebrew/opt/llvm zstd_DIR=/usr/local/opt/zstd cmake -B build -DCM for example. -# Linking LLVM Statically +# Linking LLVM Statically vs Dynamically -If you wish to link LLVM statically like the precompiled binaries do, you can specify `-DADEPT_LINK_LLVM_STATIC=On` when configuring with CMake. +### Windows -On Windows, this requires the additional libraries: +On Windows, LLVM is linked against statically by default. -- `pacman -S mingw-w64-x86_64-zstd --noconfirm` +You can specify `-DADEPT_LINK_LLVM_STATIC=Off` when configuring CMake to prefer dynamic linking if you like. + +### macOS / Linux + +On macOS and Linux, LLVM is linked against dynamically by default. + +You can specify `-DADEPT_LINK_LLVM_STATIC=On` when configuring with CMake to prefer static linking if you like. For example,