builtin: add support for '-d static_boehm -gc boehm' (only for macos and linux for now)
parent
7c79e9bce7
commit
e93a52a267
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue