builtin: add support for '-d static_boehm -gc boehm' (only for macos and linux for now)

pull/9574/head^2
Delyan Angelov 2021-04-08 19:17:04 +03:00
parent 7c79e9bce7
commit e93a52a267
1 changed files with 20 additions and 8 deletions

View File

@ -2,19 +2,31 @@ module builtin
#define GC_THREADS 1 #define GC_THREADS 1
$if windows { $if static_boehm ? {
#flag -I@VROOT/thirdparty/libgc/include $if macos {
#flag -L@VROOT/thirdparty/libgc #flag -I/opt/homebrew/include
} #flag /opt/homebrew/lib/libgc.a
$if macos { } $else $if linux {
#pkgconfig bdw-gc #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 ? { $if gcboehm_leak ? {
#define GC_DEBUG #define GC_DEBUG
} }
#include <gc.h>
#flag -lgc #include <gc.h>
// replacements for `malloc()/calloc()`, `realloc()` and `free()` // replacements for `malloc()/calloc()`, `realloc()` and `free()`
// for use with Boehm-GC // for use with Boehm-GC