1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-24 23:40:27 +00:00

Change build options for emscripten.

This commit is contained in:
Calvin Rose 2018-10-21 12:44:58 -04:00
parent 92202e1c8b
commit a20799b59a
2 changed files with 6 additions and 1 deletions

View File

@ -107,7 +107,8 @@ $(JANET_LIBRARY): $(JANET_CORE_OBJECTS)
######################
EMCC=emcc
EMCCFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]'
EMCCFLAGS=-std=c99 -Wall -Wextra -Isrc/include -fpic -O2 -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' \
-s ALLOW_MEMORY_GROWTH=1 -s WASM=1
JANET_EMTARGET=janet.js
JANET_WEB_SOURCES=$(JANET_CORE_SOURCES) $(JANET_WEBCLIENT_SOURCES)
JANET_EMOBJECTS=$(patsubst %.c,%.bc,$(JANET_WEB_SOURCES))

View File

@ -96,6 +96,8 @@ extern "C" {
/* Check emscripten */
#ifdef __EMSCRIPTEN__
#define JANET_NO_DYNAMIC_MODULES
#define JANET_NO_NANBOX
#define JANET_WALIGN 8
#endif
/* Define how global janet state is declared */
@ -180,11 +182,13 @@ extern "C" {
#endif
/* Alignment for pointers */
#ifndef JANET_WALIGN
#ifdef JANET_32
#define JANET_WALIGN 4
#else
#define JANET_WALIGN 8
#endif
#endif
/***** END SECTION CONFIG *****/