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
|
#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
|
||||||
|
|
Loading…
Reference in New Issue