1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: fix gc.o compilation on macos (#15832)

This commit is contained in:
spaceface 2022-09-21 11:19:02 +02:00 committed by GitHub
parent d848311fe2
commit 201598e68a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,12 +32,15 @@ $if dynamic_boehm ? {
$if macos || linux {
#flag -DGC_BUILTIN_ATOMIC=1
#flag -I @VEXEROOT/thirdparty/libgc/include
$if (!macos && prod && !tinyc && !debug) || !(amd64 || arm64 || i386 || arm32) {
$if (prod && !tinyc && !debug) || !(amd64 || arm64 || i386 || arm32) {
// TODO: replace the architecture check with a `!$exists("@VEXEROOT/thirdparty/tcc/lib/libgc.a")` comptime call
#flag @VEXEROOT/thirdparty/libgc/gc.o
} $else {
#flag @VEXEROOT/thirdparty/tcc/lib/libgc.a
}
$if macos {
#flag -DMPROTECT_VDB=1
}
#flag -ldl
#flag -lpthread
} $else $if freebsd {