diff --git a/vlib/builtin/builtin_d_gcboehm.v b/vlib/builtin/builtin_d_gcboehm.v index 8860239ae8..c29699568b 100644 --- a/vlib/builtin/builtin_d_gcboehm.v +++ b/vlib/builtin/builtin_d_gcboehm.v @@ -2,19 +2,31 @@ module builtin #define GC_THREADS 1 -$if windows { - #flag -I@VROOT/thirdparty/libgc/include - #flag -L@VROOT/thirdparty/libgc -} -$if macos { - #pkgconfig bdw-gc +$if static_boehm ? { + $if macos { + #flag -I/opt/homebrew/include + #flag /opt/homebrew/lib/libgc.a + } $else $if linux { + #flag -l:libgc.a + } $else { + #flag -lgc + } +} $else { + $if macos { + #pkgconfig bdw-gc + } + $if windows { + #flag -I@VROOT/thirdparty/libgc/include + #flag -L@VROOT/thirdparty/libgc + } + #flag -lgc } + $if gcboehm_leak ? { #define GC_DEBUG } -#include -#flag -lgc +#include // replacements for `malloc()/calloc()`, `realloc()` and `free()` // for use with Boehm-GC