builtin: add bdwgc to thirdparty, statically link it on Windows (#10542)
parent
42bf385ff9
commit
a621149fc2
|
@ -0,0 +1,7 @@
|
|||
The libgc source is distributed here as an amalgamation (https://sqlite.org/amalgamation.html).
|
||||
This means that, rather than mirroring the entire bdwgc repo here,
|
||||
[this script](https://gist.github.com/spaceface777/34d25420f2dc4953fb7864f44a211105) was used
|
||||
to bundle all local includes together into a single C file, which is much easier to handle.
|
||||
Furthermore, the script above was also used to minify (i.e. remove comments and whitespace in)
|
||||
the garbage collector source. Together, these details help keep the V source distribution small,
|
||||
can reduce compile times by 3%-15%, and can help C compilers generate more optimized code.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
module builtin
|
||||
|
||||
#define GC_THREADS 1
|
||||
#flag -DGC_THREADS=1
|
||||
|
||||
$if static_boehm ? {
|
||||
$if macos {
|
||||
|
@ -13,10 +13,16 @@ $if static_boehm ? {
|
|||
#flag /usr/local/lib/libgc.a
|
||||
#flag -lpthread
|
||||
} $else $if windows {
|
||||
#define GC_NOT_DLL 1
|
||||
#flag -DGC_NOT_DLL=1
|
||||
$if tinyc {
|
||||
#flag -I@VEXEROOT/thirdparty/libgc/include
|
||||
#flag -L@VEXEROOT/thirdparty/libgc
|
||||
#flag -lgc
|
||||
} $else {
|
||||
#flag -DGC_BUILTIN_ATOMIC=1
|
||||
#flag -I@VEXEROOT/thirdparty/libgc
|
||||
#flag @VEXEROOT/thirdparty/libgc/gc.o
|
||||
}
|
||||
} $else {
|
||||
#flag -lgc
|
||||
}
|
||||
|
@ -28,14 +34,22 @@ $if static_boehm ? {
|
|||
#flag -L/usr/local/lib
|
||||
}
|
||||
$if windows {
|
||||
$if tinyc {
|
||||
#flag -I@VEXEROOT/thirdparty/libgc/include
|
||||
#flag -L@VEXEROOT/thirdparty/libgc
|
||||
}
|
||||
#flag -lgc
|
||||
} $else {
|
||||
#flag -DGC_BUILTIN_ATOMIC=1
|
||||
#flag -I@VEXEROOT/thirdparty/libgc
|
||||
#flag @VEXEROOT/thirdparty/libgc/gc.o
|
||||
}
|
||||
} $else {
|
||||
#flag -lgc
|
||||
}
|
||||
}
|
||||
|
||||
$if gcboehm_leak ? {
|
||||
#define GC_DEBUG
|
||||
#flag -DGC_DEBUG=1
|
||||
}
|
||||
|
||||
#include <gc.h>
|
||||
|
|
Loading…
Reference in New Issue