Skip to content

Commit b0878d3

Browse files
committed
builtin,v.pkgconfig: use brew's libgc on macos
1 parent 1590783 commit b0878d3

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

vlib/builtin/builtin_d_gcboehm.v

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ $if windows {
66
#flag -I@VROOT/thirdparty/libgc/include
77
#flag -L@VROOT/thirdparty/libgc
88
}
9+
$if macos {
10+
#pkgconfig bdw-gc
11+
}
912

1013
#include <gc.h>
1114

12-
#flag linux -lgc
13-
#flag darwin @VROOT/thirdparty/bdwgc/extra/.libs/gc.o
15+
#flag -lgc
1416

1517
fn C.GC_MALLOC(n size_t) voidptr
1618

vlib/builtin/builtin_notd_gcboehm.v

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ fn C.GC_MALLOC(n size_t) voidptr
99
fn C.GC_REALLOC(ptr voidptr, n size_t) voidptr
1010

1111
fn C.GC_FREE(ptr voidptr)
12+
13+
// fn C.CHECK_LEAKS()
14+
fn C.GC_gcollect()

vlib/v/pkgconfig/pkgconfig.v

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ const (
1313
'/usr/lib64/pkgconfig',
1414
'/usr/lib/pkgconfig',
1515
'/usr/share/pkgconfig',
16+
'/opt/homebrew/lib/pkgconfig',
1617
]
17-
version = '0.3.0'
18+
version = '0.3.1'
1819
)
1920

2021
pub struct Options {

0 commit comments

Comments
 (0)