Skip to content

Commit 7d92370

Browse files
Build debug information alongside non-debug builds.
We should then be able to use it in Chrome's Wasm/DWARF debug tooling to understand production issues.
1 parent 7c5b2e6 commit 7d92370

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ build:
99
dist: build
1010
mkdir -p $(BUILD)/build
1111
cp -r $(SRC)/*.html $(SRC)/term.js src/examples $(BUILD)
12-
cp $(SRC)/build/firmware.js $(SRC)/build/simulator.js $(SRC)/build/firmware.wasm $(BUILD)/build/
12+
cp $(SRC)/build/firmware.js $(SRC)/build/simulator.js $(SRC)/build/*.wasm $(BUILD)/build/
1313

1414
watch: dist
1515
fswatch -o -e src/build src | while read _; do $(MAKE) dist; done

src/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ JSFLAGS += -s EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap']" --js-library jshal.j
5252

5353
ifdef DEBUG
5454
JSFLAGS += -g
55+
else
56+
JSFLAGS += -gseparate-dwarf
5557
endif
5658

5759
SRC_C += \
@@ -148,4 +150,4 @@ simulator-js:
148150

149151
include $(TOP)/py/mkrules.mk
150152

151-
.PHONY: simulator-js
153+
.PHONY: simulator-js

0 commit comments

Comments
 (0)