![]() The latest version allows overriding the default CFLAGS. By default, they're `-O2 -DNDEBUG`, thus not including DWARF debug information. This commit changes this to include the `-g` flag. Apart from an improved debug experience, this lets -size=full attribute code to wasi-libc. Before: $ tinygo build -o test.wasm -size=full ./testdata/alias.go code rodata data bss | flash ram | package ------------------------------- | --------------- | ------- 1780 0 188 130733 | 1968 130921 | (unknown) 84 0 0 0 | 84 0 | internal/task 281 0 0 0 | 281 0 | main 2374 0 4 147 | 2378 151 | runtime ------------------------------- | --------------- | ------- 4519 0 192 130880 | 4711 131072 | total After: $ tinygo build -o test.wasm -size=full ./testdata/alias.go code rodata data bss | flash ram | package ------------------------------- | --------------- | ------- 40 0 188 130733 | 228 130921 | (unknown) 1740 0 0 0 | 1740 0 | C wasi-libc 84 0 0 0 | 84 0 | internal/task 281 0 0 0 | 281 0 | main 2374 0 4 147 | 2378 151 | runtime ------------------------------- | --------------- | ------- 4519 0 192 130880 | 4711 131072 | total The main difference here is the `(unknown)` code, which turns out to be mostly wasi-libc in this trivial example. |
||
---|---|---|
.. | ||
avr@6624554c02 | ||
CMSIS@9fe411cef1 | ||
cmsis-svd@df75ff974c | ||
compiler-rt@5bc79797e1 | ||
musl@040c1d16b4 | ||
nrfx@d779b49fc5 | ||
picolibc@f68b8204f7 | ||
stm32-svd@3a0b0829b7 | ||
wasi-libc@ad5133410f | ||
picolibc-stdio.c |