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
$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 <gc.h>
#flag -lgc
#include <gc.h>
// replacements for `malloc()/calloc()`, `realloc()` and `free()`
// for use with Boehm-GC