Skip to content

Commit

Permalink
gtk wasm build wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Zubnix committed Nov 4, 2024
1 parent 7e69972 commit f5c72f7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/sdk/gtk4/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fi
DIR=$(dirname "$(readlink -f "$CURRENT_SCRIPT")")


EXTRA_LDFLAGS="-g -sINITIAL_MEMORY=384MB \
EXTRA_LDFLAGS="-g -sINITIAL_MEMORY=512MB '-fsanitize=undefined' \
--preload-file $DIR/fonts/inter@/usr/share/fonts/opentype/inter \
--preload-file $DIR/build/examples/application9/gschemas.compiled@/usr/share/glib-2.0/schemas/ \
--preload-file $_SDK_DIR/sysroot/share/X11/xkb@/home/web_user/.config/xkb \
Expand Down
4 changes: 2 additions & 2 deletions sdk/sysrootlibs/emscripten-build.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[constants]
cflags = ['-g', '-pthread', '-flto', '-msimd128']
ldflags = ['-v']
cflags = ['-g', '-pthread', '-flto', '-msimd128', '-fsanitize=undefined']
ldflags = ['-v', '-g', '-pthread', '-flto', '-msimd128', '-fsanitize=undefined']

[binaries]
ar = toolchain / 'emar'
Expand Down
2 changes: 1 addition & 1 deletion sdk/sysrootlibs/jslibraries/library_unixsockfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
$UNIXSOCKFS__postset: function() {
addAtInit('UNIXSOCKFS.root = FS.mount(UNIXSOCKFS, {}, null);');
},
$UNIXSOCKFS__deps: ['$FS', '$SOCKFS', '$Asyncify', '$MEMFS', '$PIPEFS'],
$UNIXSOCKFS__deps: ['$FS', '$SOCKFS', '$MEMFS', '$PIPEFS'],
$UNIXSOCKFS: {
mount: function(mount) {
// If Module['messageport'] has already been defined use that, if not initialise it to a new object.
Expand Down
2 changes: 1 addition & 1 deletion sdk/toolkit/bin/gf++
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _SDK_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/../.."
_SDK_CFLAGS="-sENVIRONMENT=web,worker \
-sEXIT_RUNTIME=1 \
-sPTHREAD_POOL_SIZE=1 -sPROXY_TO_PTHREAD -sUSE_PTHREADS=1 \
-sJSPI -sJSPI_IMPORTS=[__syscall_poll] \
-sJSPI -sJSPI_IMPORTS=[_emscripten_receive_on_main_thread_js] -sJSPI_EXPORTS=[_emscripten_check_mailbox] \
-sSTACK_SIZE=4MB \
--js-library $_SDK_DIR/sysrootlibs/jslibraries/library_unixsockfs.js \
--pre-js $_SDK_DIR/sysrootlibs/jslibraries/pre-main.js \
Expand Down
2 changes: 1 addition & 1 deletion sdk/toolkit/bin/gfcc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _SDK_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")/../.."
_SDK_CFLAGS="-sENVIRONMENT=web,worker \
-sEXIT_RUNTIME=1 \
-sPTHREAD_POOL_SIZE=1 -sPROXY_TO_PTHREAD -sUSE_PTHREADS=1 \
-sJSPI -sJSPI_IMPORTS=[__syscall_poll] \
-sJSPI -sJSPI_IMPORTS=[_emscripten_receive_on_main_thread_js] -sJSPI_EXPORTS=[_emscripten_check_mailbox] \
-sSTACK_SIZE=4MB \
--js-library $_SDK_DIR/sysrootlibs/jslibraries/library_unixsockfs.js \
--pre-js $_SDK_DIR/sysrootlibs/jslibraries/pre-main.js \
Expand Down
4 changes: 2 additions & 2 deletions sdk/toolkit/meson-gf-cross.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
;ldflags = ['-v', '-Wl,-u,htonl', '-Wl,-u,ntohs']

# flags for debugging
cflags = ['-pthread', '-g']
ldflags = ['-pthread', '-g']
cflags = ['-pthread', '-g', '-fsanitize=undefined']
ldflags = ['-pthread', '-g', '-fsanitize=undefined']

[binaries]
cpp = greenfield_sdk / 'toolkit/bin/gf++'
Expand Down

0 comments on commit f5c72f7

Please sign in to comment.