summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2019-04-28 22:17:42 +1000
committerDamien George <damien.p.george@gmail.com>2019-04-28 22:17:42 +1000
commitbd6fed8201a818a96611e56ecc521c23cf5255f4 (patch)
tree11fd980fc3e79f8fdd90ae71d291d94919b9702e
parent93f5f802165c3b8ab01a0393409cbd1c352596c8 (diff)
javascript/Makefile: Fix unrepresentable float error by using clamp.
Otherwise converting large floats to ints will fail (as seen by the builtin_float_hash.py test).
-rw-r--r--ports/javascript/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/javascript/Makefile b/ports/javascript/Makefile
index 9b0f4d89c..7309dfa48 100644
--- a/ports/javascript/Makefile
+++ b/ports/javascript/Makefile
@@ -44,7 +44,7 @@ OBJ = $(PY_O)
OBJ += $(addprefix $(BUILD)/, $(SRC_LIB:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
-JSFLAGS = -O0 -s EXPORTED_FUNCTIONS="['_mp_js_init', '_mp_js_init_repl', '_mp_js_do_str', '_mp_js_process_char', '_mp_hal_get_interrupt_char', '_mp_keyboard_interrupt']" -s EXTRA_EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap']" --memory-init-file 0 --js-library library.js
+JSFLAGS = -O0 -s EXPORTED_FUNCTIONS="['_mp_js_init', '_mp_js_init_repl', '_mp_js_do_str', '_mp_js_process_char', '_mp_hal_get_interrupt_char', '_mp_keyboard_interrupt']" -s EXTRA_EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap']" -s "BINARYEN_TRAP_MODE='clamp'" --memory-init-file 0 --js-library library.js
all: $(BUILD)/micropython.js