Skip to content

Commit

Permalink
Export TTY in WASM modules for cockle
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthomas23 committed Jul 29, 2024
1 parent 69c1f4b commit a4bac1b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/coreutils/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ emconfigure ./configure \

echo "sed"
sed -i 's|$(MAKE) src/make-prime-list$(EXEEXT)|gcc src/make-prime-list.c -o src/make-prime-list$(EXEEXT) -Ilib/|' Makefile
export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1"
export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1"

make EXEEXT=.js CFLAGS="$CFLAGS" -k -j4 || true

Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/coreutils/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ source:
git: https://github.com/coreutils/coreutils
tag: v9.5
build:
number: 2
number: 3

requirements:
build:
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/grep/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ emconfigure ./configure \
ac_cv_have_decl_alarm=no \
gl_cv_func_sleep_works=yes

export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0"
export CFLAGS="-O2 --minify=0 -sALLOW_MEMORY_GROWTH=1 -sENVIRONMENT=web,worker -sEXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY -sFORCE_FILESYSTEM=1 -sINVOKE_RUN=0 -sMODULARIZE=1 -sSINGLE_FILE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0"
emmake make all CFLAGS="$CFLAGS" EXEEXT=.js

ls
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/grep/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package:
# url: https://github.com/Distrotech/grep
# branch:
build:
number: 2
number: 3

requirements:
build:
Expand Down
4 changes: 2 additions & 2 deletions recipes/recipes_emscripten/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ foreach(lua_binary ${lua_binaries})
PUBLIC "SHELL: -s FORCE_FILESYSTEM"
PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1"
PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node"
PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings"
PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY"
PUBLIC "SHELL: -s MODULARIZE=1"
)
# set target link options
target_link_options(${lua_binary}
PUBLIC "SHELL: -s FORCE_FILESYSTEM"
PUBLIC "SHELL: -s ALLOW_MEMORY_GROWTH=1"
PUBLIC "SHELL: -s ENVIRONMENT=web,worker,node"
PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings"
PUBLIC "SHELL: -s EXPORTED_RUNTIME_METHODS=callMain,FS,ENV,getEnvStrings,TTY"
PUBLIC "SHELL: -s MODULARIZE=1"
)
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion recipes/recipes_emscripten/lua/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source:
- path: CMakeLists.txt

build:
number: 10
number: 11

requirements:
build:
Expand Down

0 comments on commit a4bac1b

Please sign in to comment.