windows: add support for the -size= flag

Like WebAssembly, it misses information on strings and other anonymous
symbols. However, most code (.text) is covered.
This commit is contained in:
Ayke van Laethem
2021-11-18 20:08:48 +01:00
committed by Ayke
parent 843a7ac445
commit 4ef340f228
2 changed files with 68 additions and 1 deletions
+1 -1
View File
@@ -480,7 +480,7 @@ endif
$(TINYGO) build -size short -o test.hex -target=pca10040 -opt=0 ./testdata/stdlib.go
@$(MD5SUM) test.hex
GOOS=linux GOARCH=arm $(TINYGO) build -size short -o test.elf ./testdata/cgo
GOOS=windows GOARCH=amd64 $(TINYGO) build -o test.exe ./testdata/cgo
GOOS=windows GOARCH=amd64 $(TINYGO) build -size short -o test.exe ./testdata/cgo
ifneq ($(OS),Windows_NT)
# TODO: this does not yet work on Windows. Somehow, unused functions are
# not garbage collected.