Browse Source

housekeeping: wasm optional in smoketest and fix make clean

pull/2299/head
Kenneth Bell 3 years ago
committed by Nia
parent
commit
470cbd5f53
  1. 4
      .gitignore
  2. 5
      Makefile
  3. 2
      build/.gitignore

4
.gitignore

@ -20,8 +20,12 @@ src/device/rp/*.s
vendor
llvm-build
llvm-project
build/*
# Ignore files generated by smoketest
test.bin
test.elf
test.exe
test.gba
test.hex
test.nro

5
Makefile

@ -178,6 +178,7 @@ $(LLVM_BUILDDIR): $(LLVM_BUILDDIR)/build.ninja
.PHONY: binaryen
binaryen: build/wasm-opt$(EXE)
build/wasm-opt$(EXE):
mkdir -p build
cd lib/binaryen && cmake -G Ninja . -DBUILD_STATIC_LIB=ON $(BINARYEN_OPTION) && ninja bin/wasm-opt$(EXE)
cp lib/binaryen/bin/wasm-opt$(EXE) build/wasm-opt$(EXE)
@ -273,6 +274,7 @@ smoketest:
$(TINYGO) build -size short -o test.hex -target=pca10040 examples/test
@$(MD5SUM) test.hex
# test simulated boards on play.tinygo.org
ifneq ($(WASM), 0)
$(TINYGO) build -size short -o test.wasm -tags=arduino examples/blinky1
@$(MD5SUM) test.wasm
$(TINYGO) build -size short -o test.wasm -tags=hifive1b examples/blinky1
@ -285,6 +287,7 @@ smoketest:
@$(MD5SUM) test.wasm
$(TINYGO) build -size short -o test.wasm -tags=circuitplay_express examples/blinky1
@$(MD5SUM) test.wasm
endif
# test all targets/boards
$(TINYGO) build -size short -o test.hex -target=pca10040-s132v6 examples/blinky1
@$(MD5SUM) test.hex
@ -471,8 +474,10 @@ endif
@$(MD5SUM) test.hex
$(TINYGO) build -size short -o test.hex -target=maixbit examples/blinky1
@$(MD5SUM) test.hex
ifneq ($(WASM), 0)
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/export
$(TINYGO) build -size short -o wasm.wasm -target=wasm examples/wasm/main
endif
# test various compiler flags
$(TINYGO) build -size short -o test.hex -target=pca10040 -gc=none -scheduler=none examples/blinky1
@$(MD5SUM) test.hex

2
build/.gitignore

@ -1,2 +0,0 @@
*
!.gitignore
Loading…
Cancel
Save