mirror of
https://github.com/janet-lang/janet
synced 2024-12-25 16:00:27 +00:00
Change build options for emscripten.
This commit is contained in:
parent
92202e1c8b
commit
a20799b59a
3
Makefile
3
Makefile
@ -107,7 +107,8 @@ $(JANET_LIBRARY): $(JANET_CORE_OBJECTS)
|
|||||||
######################
|
######################
|
||||||
|
|
||||||
EMCC=emcc
|
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_EMTARGET=janet.js
|
||||||
JANET_WEB_SOURCES=$(JANET_CORE_SOURCES) $(JANET_WEBCLIENT_SOURCES)
|
JANET_WEB_SOURCES=$(JANET_CORE_SOURCES) $(JANET_WEBCLIENT_SOURCES)
|
||||||
JANET_EMOBJECTS=$(patsubst %.c,%.bc,$(JANET_WEB_SOURCES))
|
JANET_EMOBJECTS=$(patsubst %.c,%.bc,$(JANET_WEB_SOURCES))
|
||||||
|
@ -96,6 +96,8 @@ extern "C" {
|
|||||||
/* Check emscripten */
|
/* Check emscripten */
|
||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
#define JANET_NO_DYNAMIC_MODULES
|
#define JANET_NO_DYNAMIC_MODULES
|
||||||
|
#define JANET_NO_NANBOX
|
||||||
|
#define JANET_WALIGN 8
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define how global janet state is declared */
|
/* Define how global janet state is declared */
|
||||||
@ -180,11 +182,13 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Alignment for pointers */
|
/* Alignment for pointers */
|
||||||
|
#ifndef JANET_WALIGN
|
||||||
#ifdef JANET_32
|
#ifdef JANET_32
|
||||||
#define JANET_WALIGN 4
|
#define JANET_WALIGN 4
|
||||||
#else
|
#else
|
||||||
#define JANET_WALIGN 8
|
#define JANET_WALIGN 8
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/***** END SECTION CONFIG *****/
|
/***** END SECTION CONFIG *****/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user