Skip to content

[MODULARIZE=instance] Mark MINIMAL_RUNTIME as not supported #24344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,14 @@ jobs:
wasmfs.test_fs_llseek_rawfs
wasmfs.test_freetype
minimal0.test_utf
instance.test_async_hello_v8
instance.test_environment
"
test-modularize-instance:
executor: focal
environment:
EMTEST_SKIP_NODE_CANARY: "1"
steps:
- run-tests-linux:
test_targets: "instance"
test-wasm2js1:
environment:
EMTEST_SKIP_NODE_CANARY: "1"
Expand Down Expand Up @@ -806,26 +811,6 @@ jobs:
core0.test_pthread_join_and_asyncify
core0.test_async_ccall_promise_jspi*
core0.test_cubescript_jspi
instance.test_hello_world
instance.test_dylink_basics
instance.test_cube2hash*
instance.test_exceptions_3*
instance.test_memorygrowth
instance.test_stat
instance.test_iostream_and_determinism
instance.test_fannkuch
instance.test_fasta
instance.test_EXPORTED_RUNTIME_METHODS
instance.test_abort_on_exceptions*
instance.test_ccall
instance.test_dylink_basics*
instance.test_Module_dynamicLibraries*
instance.test_dylink_argv_argc
instance.test_dlmalloc*
instance.test_dyncall*
instance.test_em_asm*
instance.test_embind*
instance.test_module_wasm_memory
esm_integration.test_fs_js_api*
esm_integration.test_inlinejs3
esm_integration.test_embind_val_basics
Expand Down Expand Up @@ -1154,6 +1139,9 @@ workflows:
- test-other:
requires:
- build-linux
- test-modularize-instance:
requires:
- build-linux
- test-browser-chrome
- test-browser-chrome-2gb:
requires:
Expand Down
2 changes: 2 additions & 0 deletions site/source/docs/compiling/Modularized-Output.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ fix in future releses. Current limitations include:
* :ref:`asyncify_lazy_load_code` is not supported (depends on ``wasmExports``
global)

* :ref:`minimal_runtime` is not supported.

* The output of file_packager is not compatible so :ref:`emcc-preload-file` and
:ref:`emcc-embed-file` do not work.

Expand Down
2 changes: 1 addition & 1 deletion src/lib/libccall.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

addToLibrary({
// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
#if MODULARIZE == 'instance'
#if MODULARIZE == 'instance' && !INCLUDE_FULL_LIBRARY
$getCFunc__deps: [() => error('ccall is not yet compatible with MODULARIZE=instance')],
#endif
$getCFunc__internal: true,
Expand Down
2 changes: 2 additions & 0 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ def metafunc(self, with_minimal_runtime, *args, **kwargs):
print('parameterize:minimal_runtime=%s' % with_minimal_runtime)
assert self.get_setting('MINIMAL_RUNTIME') is None
if with_minimal_runtime:
if self.get_setting('MODULARIZE') == 'instance':
self.skipTest('MODULARIZE=instance is not compatible with MINIMAL_RUNTIME')
self.set_setting('MINIMAL_RUNTIME', 1)
# This extra helper code is needed to cleanly handle calls to exit() which throw
# an ExitCode exception.
Expand Down
2 changes: 1 addition & 1 deletion test/core/pthread/test_pthread_exit_runtime.pre.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var address = 0;

Module.onRuntimeInitialized = function() {
address = Module['_join_returned_address']();
address = _join_returned_address();
assert(address);
assert(HEAP8[address] == 0);
}
Expand Down
2 changes: 1 addition & 1 deletion test/core/test_env.out
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PATH=/
PWD=/
HOME=/home/web_user
LANG=(C|en_US).UTF-8
_=.*(/test_env.js|./this.program)
_=.*(/test_env.m?js|./this.program)

getenv\(PATH\): /
getenv\(NONEXISTENT\): \(null\)
Expand Down
2 changes: 1 addition & 1 deletion test/core/test_environ.out
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ PATH=/
PWD=/
HOME=/home/web_user
LANG=(C|en_US).UTF-8
_=.*(/test_environ.js|/this.program)
_=.*(/test_environ.m?js|/this.program)
2 changes: 1 addition & 1 deletion test/core/test_main_reads_args.out
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
argc: 1
argv\[0\]: (test_main_reads_args\.js|this\.program)
argv\[0\]: (test_main_reads_args\.m?js|this\.program)
19 changes: 12 additions & 7 deletions test/core/test_utf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@
*/

#include <stdio.h>
#include <emscripten.h>
#include <stdlib.h>

#include <emscripten/emscripten.h>
#include <emscripten/em_js.h>

EM_JS_DEPS(deps, "$stringToUTF8OnStack,$getValue");

int main() {
char *c = "μ†ℱ ╋ℯ╳╋ 😇";
printf("%hhu %hhu %hhu %hhu %s\n", c[0], c[1], c[2], c[3], c);
emscripten_run_script(
"var cheez = Module.stringToUTF8OnStack(\"μ†ℱ ╋ℯ╳╋ 😇\");"
"out(UTF8ToString(cheez), Module.getValue(cheez+0, 'i8')&0xff, "
" Module.getValue(cheez+1, 'i8')&0xff, "
" Module.getValue(cheez+2, 'i8')&0xff, "
" Module.getValue(cheez+3, 'i8')&0xff);");
EM_ASM({
var cheez = stringToUTF8OnStack("μ†ℱ ╋ℯ╳╋ 😇");
out(UTF8ToString(cheez), getValue(cheez+0, 'i8')&0xff,
getValue(cheez+1, 'i8')&0xff,
getValue(cheez+2, 'i8')&0xff,
getValue(cheez+3, 'i8')&0xff);
});
}
Loading