mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
builtin,thirdparty: fix compilation of libgc with -cc msvc -gc boehm
(thanks to @Ekopalypse)
This commit is contained in:
parent
31e698f5b5
commit
6834ccb2d5
2 changed files with 7 additions and 0 deletions
2
thirdparty/libgc/include/gc.h
vendored
2
thirdparty/libgc/include/gc.h
vendored
|
@ -1,6 +1,8 @@
|
||||||
/* This file is installed for backward compatibility. */
|
/* This file is installed for backward compatibility. */
|
||||||
#include "gc/gc.h"
|
#include "gc/gc.h"
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
__attribute__ ((weak)) GC_API void GC_CALL GC_noop1_ptr(volatile void *p) {
|
__attribute__ ((weak)) GC_API void GC_CALL GC_noop1_ptr(volatile void *p) {
|
||||||
GC_noop1((u64)p);
|
GC_noop1((u64)p);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -114,7 +114,12 @@ $if gcboehm_leak ? {
|
||||||
#flag -DGC_DEBUG=1
|
#flag -DGC_DEBUG=1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$if windows && msvc {
|
||||||
|
#flag ucrtd.lib
|
||||||
|
}
|
||||||
|
|
||||||
#include <gc.h>
|
#include <gc.h>
|
||||||
|
|
||||||
// #include <gc/gc_mark.h>
|
// #include <gc/gc_mark.h>
|
||||||
|
|
||||||
// replacements for `malloc()/calloc()`, `realloc()` and `free()`
|
// replacements for `malloc()/calloc()`, `realloc()` and `free()`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue