-
Notifications
You must be signed in to change notification settings - Fork 989
all: shrink bdwgc library #4832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,10 @@ var BoehmGC = Library{ | |
// Use a minimal environment. | ||
"-DNO_MSGBOX_ON_ERROR", // don't call MessageBoxA on Windows | ||
"-DDONT_USE_ATEXIT", | ||
"-DNO_GETENV", | ||
"-DNO_GETENV", // smaller binary, more predictable configuration | ||
"-DNO_CLOCK", // don't use system clock | ||
"-DNO_DEBUGGING", // reduce code size | ||
"-DGC_NO_FINALIZATION", // finalization is not used at the moment | ||
|
||
// Special flag to work around the lack of __data_start in ld.lld. | ||
// TODO: try to fix this in LLVM/lld directly so we don't have to | ||
|
@@ -39,6 +42,8 @@ var BoehmGC = Library{ | |
|
||
// Do not scan the stack. We have our own mechanism to do this. | ||
"-DSTACK_NOT_SCANNED", | ||
"-DNO_PROC_STAT", // we scan the stack manually (don't read /proc/self/stat on Linux) | ||
"-DSTACKBOTTOM=0", // dummy value, we scan the stack manually | ||
|
||
// Assertions can be enabled while debugging GC issues. | ||
//"-DGC_ASSERTIONS", | ||
|
@@ -63,15 +68,13 @@ var BoehmGC = Library{ | |
"blacklst.c", | ||
"dbg_mlc.c", | ||
"dyn_load.c", | ||
"finalize.c", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there's no need to exclude finalize.c as it should compile to zero size if GC_NO_FINALIZATION is defined. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, but there's no reason to include it either 🤷 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you update to latest bdwgc/master, remove obj_map.c from the list below. |
||
"headers.c", | ||
"mach_dep.c", | ||
"malloc.c", | ||
"mark.c", | ||
"mark_rts.c", | ||
"misc.c", | ||
"new_hblk.c", | ||
"obj_map.c", | ||
"os_dep.c", | ||
"reclaim.c", | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the latest bdwgc master:
dbg_mlc.c
is not needed unless you useGC_debug_*
API.