Fix issue #2251 (#2252)
authorLucas Castro <lcbc.lucascastro@gmail.com>
Thu, 9 Jul 2020 16:50:26 +0000 (13:50 -0300)
committerGitHub <noreply@github.com>
Thu, 9 Jul 2020 16:50:26 +0000 (18:50 +0200)
* Fix #2251 - YosysJS ReferenceError: _memset is not defined.
Add '_memset' in emcc EXPORTED_FUNCTIONS in Makefile.

Makefile

index b9c3d14eb1ec3508301d794766726c0269b763ad..ec8b38c480cc41b25cb7c47561ff6e83e3f2af19 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -247,7 +247,7 @@ CXXFLAGS := -std=c++11 $(filter-out -fPIC -ggdb,$(CXXFLAGS))
 ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H -DABC_MEMALIGN=8"
 EMCCFLAGS := -Os -Wno-warn-absolute-paths
 EMCCFLAGS += --memory-init-file 0 --embed-file share -s NO_EXIT_RUNTIME=1
-EMCCFLAGS += -s EXPORTED_FUNCTIONS="['_main','_run','_prompt','_errmsg']"
+EMCCFLAGS += -s EXPORTED_FUNCTIONS="['_main','_run','_prompt','_errmsg','_memset']"
 EMCCFLAGS += -s TOTAL_MEMORY=134217728
 EMCCFLAGS += -s EXTRA_EXPORTED_RUNTIME_METHODS='["ccall", "cwrap"]'
 # https://github.com/kripken/emscripten/blob/master/src/settings.js