Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dca3126

Browse filesBrowse files
committed
all: shrink bdwgc library
By disabling some configuration options, the library becomes a lot smaller. On Linux, binaries are ~12kb smaller. This isn't really important on Linux/macOS/Windows, but will become important when we start using bdwgc on WebAssembly.
1 parent fdf075a commit dca3126
Copy full SHA for dca3126

File tree

1 file changed

+4
-0
lines changed
Filter options

1 file changed

+4
-0
lines changed

‎builder/bdwgc.go

Copy file name to clipboardExpand all lines: builder/bdwgc.go
+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ var BoehmGC = Library{
3030
// Use a minimal environment.
3131
"-DNO_MSGBOX_ON_ERROR", // don't call MessageBoxA on Windows
3232
"-DDONT_USE_ATEXIT",
33+
"-DNO_CLOCK", // don't use system clock
34+
"-DNO_DEBUGGING", // reduce code size
35+
"-DGC_NO_FINALIZATION", // finalization is not used at the moment
36+
"-DNO_GETENV", // smaller binary, more predictable configuration
3337

3438
// Special flag to work around the lack of __data_start in ld.lld.
3539
// TODO: try to fix this in LLVM/lld directly so we don't have to

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.