diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 936673dfa74fc..767fb472438fd 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,16 +1,16 @@ - + https://github.com/dotnet/icu - bc6d6740a2b8ba5c2943e1a7a0eaa9781a862050 + 4f251e7593b1150af58bba4f461698d6d4a1eb95 https://github.com/dotnet/msquic a7213b4676c1803bb251771291a525482d42e511 - + https://github.com/dotnet/emsdk - e6541169ee0347b4c3af1b83a0ab9fc19121283c + b2054b98cb7b9e555cbbe19955df823ec81a93ad https://github.com/dotnet/wcf diff --git a/eng/Versions.props b/eng/Versions.props index 507101b9dc037..ee15b1b7f9ca0 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -184,7 +184,7 @@ 7.0.100-1.22107.1 $(MicrosoftNETILLinkTasksVersion) - 7.0.0-preview.3.22115.2 + 7.0.0-preview.2.22081.1 7.0.0-alpha.1.21529.3 @@ -197,7 +197,7 @@ 11.1.0-alpha.1.22114.2 11.1.0-alpha.1.22114.2 - 7.0.0-alpha.2.22111.1 + 7.0.0-alpha.2.22077.1 $(MicrosoftNETWorkloadEmscriptenManifest70100Version) 1.1.87-gba258badda diff --git a/eng/liveBuilds.targets b/eng/liveBuilds.targets index 8f91d3e6e4257..48d6a045a90d6 100644 --- a/eng/liveBuilds.targets +++ b/eng/liveBuilds.targets @@ -191,7 +191,6 @@ $(LibrariesNativeArtifactsPath)src\*.c; $(LibrariesNativeArtifactsPath)src\*.js; $(LibrariesNativeArtifactsPath)src\emcc-default.rsp; - $(LibrariesNativeArtifactsPath)src\emcc-link.rsp; $(LibrariesNativeArtifactsPath)src\emcc-props.json;" NativeSubDirectory="src" IsNative="true" /> diff --git a/eng/pipelines/common/platform-matrix.yml b/eng/pipelines/common/platform-matrix.yml index a6ccd0efc19be..22fa0be43584d 100644 --- a/eng/pipelines/common/platform-matrix.yml +++ b/eng/pipelines/common/platform-matrix.yml @@ -303,7 +303,7 @@ jobs: targetRid: browser-wasm platform: Browser_wasm container: - image: ubuntu-18.04-webassembly-20211208134944-544b18c + image: ubuntu-18.04-webassembly-20210707133424-12f133e registry: mcr jobParameters: hostedOs: Linux diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 346cc1076bc2e..dae9a05bec145 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -182,6 +182,6 @@ jobs: # WebAssembly windows - ${{ if eq(parameters.platform, 'Browser_wasm_win') }}: - - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h2.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20211208140215-544b18c + - (Windows.Server.Core.1909.Amd64.Open)windows.10.amd64.server20h2.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-2004-helix-webassembly-amd64-20210702131541-6837048 ${{ insert }}: ${{ parameters.jobParameters }} diff --git a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props index e94c73bb92386..f122fd1fcf526 100644 --- a/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props +++ b/src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props @@ -235,7 +235,6 @@ - diff --git a/src/mono/mono/component/debugger-agent.c b/src/mono/mono/component/debugger-agent.c index 8221e93c36bf6..51e801e71763a 100644 --- a/src/mono/mono/component/debugger-agent.c +++ b/src/mono/mono/component/debugger-agent.c @@ -414,7 +414,7 @@ static gboolean buffer_replies; DebuggerTlsData *tls; \ tls = (DebuggerTlsData *)mono_native_tls_get_value (debugger_tls_id); #else -#define GET_TLS_DATA_FROM_THREAD(...) \ +#define GET_TLS_DATA_FROM_THREAD(thread) \ DebuggerTlsData *tls; \ tls = &debugger_wasm_thread; #define GET_DEBUGGER_TLS() \ @@ -9145,9 +9145,7 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) int objid; ErrorCode err; MonoThread *thread_obj; -#ifndef TARGET_WASM MonoInternalThread *thread; -#endif int pos, i, len, frame_idx; StackFrame *frame; MonoDebugMethodJitInfo *jit; @@ -9161,16 +9159,11 @@ frame_commands (int command, guint8 *p, guint8 *end, Buffer *buf) if (err != ERR_NONE) return err; -#ifndef TARGET_WASM thread = THREAD_TO_INTERNAL (thread_obj); -#endif + id = decode_id (p, &p, end); -#ifndef TARGET_WASM GET_TLS_DATA_FROM_THREAD (thread); -#else - GET_TLS_DATA_FROM_THREAD (); -#endif g_assert (tls); for (i = 0; i < tls->frame_count; ++i) { diff --git a/src/mono/mono/metadata/seq-points-data.c b/src/mono/mono/metadata/seq-points-data.c index 454227bf45bb4..fa80737f1e2b3 100644 --- a/src/mono/mono/metadata/seq-points-data.c +++ b/src/mono/mono/metadata/seq-points-data.c @@ -409,13 +409,7 @@ mono_seq_point_data_read (SeqPointData *data, char *path) fseek(f, 0, SEEK_SET); buffer_orig = buffer = (guint8 *)g_malloc (fsize + 1); - size_t len = fread(buffer_orig, fsize, 1, f); - if (ferror(f)) { - fclose(f); - return FALSE; - } - g_assert (len == fsize || (len < fsize && feof(f))); - + fread(buffer_orig, fsize, 1, f); fclose(f); entry_count = decode_var_int (buffer, &buffer); diff --git a/src/mono/mono/metadata/sre-encode.c b/src/mono/mono/metadata/sre-encode.c index 1a5520a4852fe..4bcbbf7683c4b 100644 --- a/src/mono/mono/metadata/sre-encode.c +++ b/src/mono/mono/metadata/sre-encode.c @@ -422,7 +422,7 @@ mono_dynimage_encode_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType * HANDLE_FUNCTION_ENTER (); MonoDynamicTable *table; - guint32 token; + guint32 token, enclosing; MonoClass *klass; /* if the type requires a typespec, we must try that first*/ @@ -446,8 +446,11 @@ mono_dynimage_encode_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType * goto leave; } - if (m_class_get_nested_in (klass)) - mono_dynimage_encode_typedef_or_ref_full (assembly, m_class_get_byval_arg (m_class_get_nested_in (klass)), FALSE); + if (m_class_get_nested_in (klass)) { + enclosing = mono_dynimage_encode_typedef_or_ref_full (assembly, m_class_get_byval_arg (m_class_get_nested_in (klass)), FALSE); + /* get the typeref idx of the enclosing type */ + enclosing >>= MONO_TYPEDEFORREF_BITS; + } table = &assembly->tables [MONO_TABLE_TYPEREF]; token = MONO_TYPEDEFORREF_TYPEREF | (table->next_idx << MONO_TYPEDEFORREF_BITS); /* typeref */ g_hash_table_insert (assembly->typeref, type, GUINT_TO_POINTER(token)); diff --git a/src/mono/mono/mini/aot-runtime.c b/src/mono/mono/mini/aot-runtime.c index a42b2bccc2f26..0e90a9749c4db 100644 --- a/src/mono/mono/mini/aot-runtime.c +++ b/src/mono/mono/mini/aot-runtime.c @@ -2668,7 +2668,7 @@ compute_llvm_code_range (MonoAotModule *amodule, guint8 **code_start, guint8 **c #ifdef HOST_WASM gsize min = 1 << 30, max = 0; - //gsize prev = 0; + gsize prev = 0; // FIXME: This depends on emscripten allocating ftnptr ids sequentially for (int i = 0; i < amodule->info.nmethods; ++i) { @@ -2682,7 +2682,7 @@ compute_llvm_code_range (MonoAotModule *amodule, guint8 **code_start, guint8 **c min = val; else if (val > max) max = val; - //prev = val; + prev = val; } } if (max) { @@ -5689,16 +5689,12 @@ get_new_unbox_arbitrary_trampoline_frome_page (gpointer addr) static gpointer get_numerous_trampoline (MonoAotTrampoline tramp_type, int n_got_slots, MonoAotModule **out_amodule, guint32 *got_offset, guint32 *out_tramp_size) { -#ifndef DISABLE_ASSERT_MESSAGES MonoImage *image; -#endif MonoAotModule *amodule = get_mscorlib_aot_module (); int index, tramp_size; -#ifndef DISABLE_ASSERT_MESSAGES /* Currently, we keep all trampolines in the mscorlib AOT image */ image = mono_defaults.corlib; -#endif *out_amodule = amodule; diff --git a/src/mono/mono/mini/driver.c b/src/mono/mono/mini/driver.c index 53a235f5871d1..eae25be57ab2c 100644 --- a/src/mono/mono/mini/driver.c +++ b/src/mono/mono/mini/driver.c @@ -2067,12 +2067,9 @@ mono_main (int argc, char* argv[]) MonoDomain *domain; MonoImageOpenStatus open_status; const char* aname, *mname = NULL; - int i; -#ifndef DISABLE_JIT - int count = 1; - MonoGraphOptions mono_graph_options = (MonoGraphOptions)0; -#endif + int i, count = 1; guint32 opt, action = DO_EXEC, recompilation_times = 1; + MonoGraphOptions mono_graph_options = (MonoGraphOptions)0; int mini_verbose_level = 0; char *trace_options = NULL; char *aot_options = NULL; @@ -2225,7 +2222,6 @@ mono_main (int argc, char* argv[]) } else if (strcmp (argv [i], "--mixed-mode") == 0) { mixed_mode = TRUE; #endif -#ifndef DISABLE_JIT } else if (strcmp (argv [i], "--ncompile") == 0) { if (i + 1 >= argc){ fprintf (stderr, "error: --ncompile requires an argument\n"); @@ -2233,7 +2229,6 @@ mono_main (int argc, char* argv[]) } count = atoi (argv [++i]); action = DO_BENCH; -#endif } else if (strcmp (argv [i], "--trace") == 0) { trace_options = (char*)""; } else if (strncmp (argv [i], "--trace=", 8) == 0) { @@ -2351,7 +2346,6 @@ mono_main (int argc, char* argv[]) mname = argv [++i]; action = DO_BENCH; -#ifndef DISABLE_JIT } else if (strncmp (argv [i], "--graph=", 8) == 0) { if (i + 1 >= argc){ fprintf (stderr, "error: --graph option requires a method name argument\n"); @@ -2370,7 +2364,6 @@ mono_main (int argc, char* argv[]) mname = argv [++i]; mono_graph_options = MONO_GRAPH_CFG; action = DO_DRAW; -#endif } else if (strcmp (argv [i], "--debug") == 0) { enable_debugging = TRUE; } else if (strncmp (argv [i], "--debug=", 8) == 0) { diff --git a/src/mono/mono/mini/mini-generic-sharing.c b/src/mono/mono/mini/mini-generic-sharing.c index 6ba217275875f..91811f678deb6 100644 --- a/src/mono/mono/mini/mini-generic-sharing.c +++ b/src/mono/mono/mini/mini-generic-sharing.c @@ -1739,9 +1739,7 @@ mini_get_interp_in_wrapper (MonoMethodSignature *sig) static GHashTable *cache; const char *name; gboolean generic = FALSE; -#ifndef DISABLE_JIT gboolean return_native_struct; -#endif sig = mini_get_underlying_reg_signature (sig); @@ -1765,9 +1763,7 @@ mini_get_interp_in_wrapper (MonoMethodSignature *sig) * stack, pass this address to the interp_entry and when we return it we use * CEE_MONO_LDNATIVEOBJ */ -#ifndef DISABLE_JIT return_native_struct = sig->ret->type == MONO_TYPE_VALUETYPE && sig->pinvoke && !sig->marshalling_disabled; -#endif /* Create the signature for the wrapper */ csig = g_malloc0 (MONO_SIZEOF_METHOD_SIGNATURE + (sig->param_count * sizeof (MonoType*))); diff --git a/src/mono/mono/mini/mini-runtime.c b/src/mono/mono/mini/mini-runtime.c index 697eacdb51120..db2f65c7329dc 100644 --- a/src/mono/mono/mini/mini-runtime.c +++ b/src/mono/mono/mini/mini-runtime.c @@ -3285,7 +3285,7 @@ mono_llvmonly_runtime_invoke (MonoMethod *method, RuntimeInvokeInfo *info, void static MonoObject* mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc, MonoError *error) { - MonoMethod *callee; + MonoMethod *invoke, *callee; MonoObject *(*runtime_invoke) (MonoObject *this_obj, void **params, MonoObject **exc, void* compiled_method); RuntimeInvokeInfo *info, *info2; MonoJitInfo *ji = NULL; @@ -3328,7 +3328,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec MonoMethod *wrapper; wrapper = mono_marshal_get_array_accessor_wrapper (method); - mono_marshal_get_runtime_invoke (wrapper, FALSE); + invoke = mono_marshal_get_runtime_invoke (wrapper, FALSE); callee = wrapper; } else { callee = NULL; @@ -3404,8 +3404,8 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec static RuntimeInvokeDynamicFunction dyn_runtime_invoke = NULL; if (info->dyn_call_info) { if (!dyn_runtime_invoke) { - MonoMethod *dynamic_invoke = mono_marshal_get_runtime_invoke_dynamic (); - RuntimeInvokeDynamicFunction invoke_func = (RuntimeInvokeDynamicFunction)mono_jit_compile_method_jit_only (dynamic_invoke, error); + invoke = mono_marshal_get_runtime_invoke_dynamic (); + RuntimeInvokeDynamicFunction invoke_func = (RuntimeInvokeDynamicFunction)mono_jit_compile_method_jit_only (invoke, error); mono_memory_barrier (); dyn_runtime_invoke = invoke_func; if (!dyn_runtime_invoke && mono_use_interpreter) { diff --git a/src/mono/mono/mini/mini-wasm.c b/src/mono/mono/mini/mini-wasm.c index 4d1af4eeb520a..f341690dd7d59 100644 --- a/src/mono/mono/mini/mini-wasm.c +++ b/src/mono/mono/mini/mini-wasm.c @@ -209,6 +209,7 @@ mono_arch_create_vars (MonoCompile *cfg) { MonoMethodSignature *sig; CallInfo *cinfo; + MonoType *sig_ret; sig = mono_method_signature_internal (cfg->method); @@ -219,7 +220,7 @@ mono_arch_create_vars (MonoCompile *cfg) // if (cinfo->ret.storage == ArgValuetypeInReg) // cfg->ret_var_is_local = TRUE; - mini_get_underlying_type (sig->ret); + sig_ret = mini_get_underlying_type (sig->ret); if (cinfo->ret.storage == ArgValuetypeAddrInIReg || cinfo->ret.storage == ArgGsharedVTOnStack) { cfg->vret_addr = mono_compile_create_var (cfg, mono_get_int_type (), OP_ARG); if (G_UNLIKELY (cfg->verbose_level > 1)) { @@ -646,6 +647,8 @@ mono_arch_patch_code_new (MonoCompile *cfg, guint8 *code, MonoJumpInfo *ji, gpoi G_BEGIN_DECLS +void * getgrnam (const char *name); +void * getgrgid (gid_t gid); int inotify_init (void); int inotify_rm_watch (int fd, int wd); int inotify_add_watch (int fd, const char *pathname, uint32_t mask); @@ -675,6 +678,13 @@ pthread_setschedparam(pthread_t thread, int policy, const struct sched_param *pa return 0; } +int +pthread_sigmask (int how, const sigset_t *set, sigset_t *oset) +{ + return 0; +} + + int sigsuspend(const sigset_t *sigmask) { @@ -688,6 +698,18 @@ getdtablesize (void) return 256; //random constant that is the fd limit } +void * +getgrnam (const char *name) +{ + return NULL; +} + +void * +getgrgid (gid_t gid) +{ + return NULL; +} + int inotify_init (void) { @@ -725,6 +747,22 @@ ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count) return -1; } +int +getpwnam_r (const char *name, struct passwd *pwd, char *buffer, size_t bufsize, + struct passwd **result) +{ + *result = NULL; + return ENOTSUP; +} + +int +getpwuid_r (uid_t uid, struct passwd *pwd, char *buffer, size_t bufsize, + struct passwd **result) +{ + *result = NULL; + return ENOTSUP; +} + G_END_DECLS /* Helper for runtime debugging */ diff --git a/src/mono/mono/sgen/sgen-gc.h b/src/mono/mono/sgen/sgen-gc.h index 43e397727abdd..ef7569f4fe980 100644 --- a/src/mono/mono/sgen/sgen-gc.h +++ b/src/mono/mono/sgen/sgen-gc.h @@ -1222,7 +1222,6 @@ sgen_dummy_use (gpointer v) { #if defined(_MSC_VER) || defined(HOST_WASM) static volatile gpointer ptr; - (void)ptr; // avoid compiler warning: variable 'ptr' set but not used ptr = v; #elif defined(__GNUC__) __asm__ volatile ("" : "=r"(v) : "r"(v)); diff --git a/src/mono/mono/sgen/sgen-workers.h b/src/mono/mono/sgen/sgen-workers.h index cb42d695aee89..577466ea3c325 100644 --- a/src/mono/mono/sgen/sgen-workers.h +++ b/src/mono/mono/sgen/sgen-workers.h @@ -81,7 +81,7 @@ void sgen_workers_set_num_active_workers (int generation, int num_workers); #ifndef DISABLE_SGEN_MAJOR_MARKSWEEP_CONC void sgen_workers_start_all_workers (int generation, SgenObjectOperations *object_ops_nopar, SgenObjectOperations *object_ops_par, SgenWorkersFinishCallback finish_job); #else -#define sgen_workers_start_all_workers(generation, object_ops_nopar, object_ops_par, finish_job) (void)object_ops_par; // avoid compiler warning: variable 'object_ops_par' set but not used +#define sgen_workers_start_all_workers(...) #endif void sgen_workers_enqueue_job (int generation, SgenThreadPoolJob *job, gboolean enqueue); diff --git a/src/mono/mono/utils/mono-mmap-wasm.c b/src/mono/mono/utils/mono-mmap-wasm.c index bf325fa8959ea..3364ec4fed939 100644 --- a/src/mono/mono/utils/mono-mmap-wasm.c +++ b/src/mono/mono/utils/mono-mmap-wasm.c @@ -161,6 +161,7 @@ int mono_vfree (void *addr, size_t length, MonoMemAccountType type) { VallocInfo *info = (VallocInfo*)(valloc_hash ? g_hash_table_lookup (valloc_hash, addr) : NULL); + int res; if (info) { /* @@ -168,13 +169,13 @@ mono_vfree (void *addr, size_t length, MonoMemAccountType type) * mono_valloc_align (), free the original mapping. */ BEGIN_CRITICAL_SECTION; - munmap (info->addr, info->size); + res = munmap (info->addr, info->size); END_CRITICAL_SECTION; g_free (info); g_hash_table_remove (valloc_hash, addr); } else { BEGIN_CRITICAL_SECTION; - munmap (addr, length); + res = munmap (addr, length); END_CRITICAL_SECTION; } diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 3c70eea3b3d61..8d8db3488013c 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -151,7 +151,6 @@ <_MonoAotCrossCompilerPath>@(MonoAotCrossCompiler->WithMetadataValue('RuntimeIdentifier','browser-wasm')) <_EmccDefaultFlagsRsp>$([MSBuild]::NormalizePath($(_WasmRuntimePackSrcDir), 'emcc-default.rsp')) - <_EmccDefaultLinkFlagsRsp>$([MSBuild]::NormalizePath($(_WasmRuntimePackSrcDir), 'emcc-link.rsp')) false true true @@ -217,11 +216,10 @@ <_EmccLDFlags Include="$(EmccLinkOptimizationFlag)" /> <_EmccLDFlags Include="@(_EmccCommonFlags)" /> - <_EmccLDFlags Include="-Wl,--allow-undefined" /> - <_EmccLDSFlags Include="-s TOTAL_MEMORY=$(EmccTotalMemory)" /> + <_EmccLDFlags Include="-s TOTAL_MEMORY=$(EmccTotalMemory)" /> - <_EmccLDSFlags Include="-s ERROR_ON_UNDEFINED_SYMBOLS=0" Condition="'$(WasmBuildingForNestedPublish)' != 'true'" /> + <_EmccLDFlags Include="-s ERROR_ON_UNDEFINED_SYMBOLS=0" Condition="'$(WasmBuildingForNestedPublish)' != 'true'" /> <_DriverCDependencies Include="$(_WasmPInvokeHPath);$(_WasmICallTablePath)" /> <_DriverCDependencies Include="$(_DriverGenCPath)" Condition="'$(_DriverGenCNeeded)' == 'true'" /> @@ -373,7 +371,6 @@ <_WasmExtraJSFile Include="@(Content)" Condition="'%(Content.Extension)' == '.js'" /> <_EmccLinkStepArgs Include="@(_EmccLDFlags)" /> - <_EmccLinkStepArgs Include="@(_EmccLDSFlags)" /> <_EmccLinkStepArgs Include="--%(_WasmExtraJSFile.Kind) "%(_WasmExtraJSFile.Identity)"" Condition="'%(_WasmExtraJSFile.Kind)' != ''" /> <_WasmLinkDependencies Include="@(_WasmExtraJSFile)" /> @@ -394,14 +391,14 @@ - + diff --git a/src/mono/wasm/emscripten-version.txt b/src/mono/wasm/emscripten-version.txt index 59ef4a7aa8377..8fe1046e01fc8 100644 --- a/src/mono/wasm/emscripten-version.txt +++ b/src/mono/wasm/emscripten-version.txt @@ -1 +1 @@ -2.0.34 \ No newline at end of file +2.0.23 \ No newline at end of file diff --git a/src/mono/wasm/runtime/CMakeLists.txt b/src/mono/wasm/runtime/CMakeLists.txt index 955228621ab93..9721e39682c9b 100644 --- a/src/mono/wasm/runtime/CMakeLists.txt +++ b/src/mono/wasm/runtime/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_EXECUTABLE_SUFFIX ".js") add_executable(dotnet corebindings.c driver.c pinvoke.c) target_include_directories(dotnet PUBLIC ${MONO_INCLUDES} ${MONO_OBJ_INCLUDES}) -target_compile_options(dotnet PUBLIC @${NATIVE_BIN_DIR}/src/emcc-default.rsp @${NATIVE_BIN_DIR}/src/emcc-compile.rsp -DCORE_BINDINGS -DGEN_PINVOKE=1) +target_compile_options(dotnet PUBLIC @${NATIVE_BIN_DIR}/src/emcc-default.rsp -DCORE_BINDINGS -DGEN_PINVOKE=1) set_target_properties(dotnet PROPERTIES COMPILE_FLAGS ${CONFIGURATION_EMCC_FLAGS}) @@ -25,7 +25,7 @@ target_link_libraries(dotnet set_target_properties(dotnet PROPERTIES LINK_DEPENDS "${NATIVE_BIN_DIR}/src/emcc-default.rsp;${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.pre.js;${NATIVE_BIN_DIR}/src/cjs/runtime.cjs.iffe.js;${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.lib.js;${NATIVE_BIN_DIR}/src/pal_random.lib.js;${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.post.js;${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.extpost.js;" - LINK_FLAGS "@${NATIVE_BIN_DIR}/src/emcc-default.rsp @${NATIVE_BIN_DIR}/src/emcc-link.rsp ${CONFIGURATION_LINK_FLAGS} -DENABLE_NETCORE=1 --extern-pre-js ${NATIVE_BIN_DIR}/src/cjs/runtime.cjs.iffe.js --pre-js ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.pre.js --js-library ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.lib.js --js-library ${NATIVE_BIN_DIR}/src/pal_random.lib.js --post-js ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.post.js --extern-post-js ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.extpost.js " + LINK_FLAGS "@${NATIVE_BIN_DIR}/src/emcc-default.rsp ${CONFIGURATION_LINK_FLAGS} -DENABLE_NETCORE=1 --extern-pre-js ${NATIVE_BIN_DIR}/src/cjs/runtime.cjs.iffe.js --pre-js ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.pre.js --js-library ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.lib.js --js-library ${NATIVE_BIN_DIR}/src/pal_random.lib.js --post-js ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.post.js --extern-post-js ${NATIVE_BIN_DIR}/src/cjs/dotnet.cjs.extpost.js " RUNTIME_OUTPUT_DIRECTORY "${NATIVE_BIN_DIR}") if(CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/src/mono/wasm/test-main.js b/src/mono/wasm/test-main.js index 68a8bb3daee88..ec19ba9a67b59 100644 --- a/src/mono/wasm/test-main.js +++ b/src/mono/wasm/test-main.js @@ -244,7 +244,7 @@ globalThis.App = App; // Necessary as System.Runtime.InteropServices.JavaScript. function set_exit_code(exit_code, reason) { if (reason) { - console.error(`${JSON.stringify(reason)}`); + console.error(reason.toString()); if (reason.stack) { console.error(reason.stack); } diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index b3dd1ac43a5eb..512ec272cf135 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -12,8 +12,6 @@ emcc $(ArtifactsObjDir)wasm <_EmccDefaultsRspPath>$(NativeBinDir)src\emcc-default.rsp - <_EmccCompileRspPath>$(NativeBinDir)src\emcc-compile.rsp - <_EmccLinkRspPath>$(NativeBinDir)src\emcc-link.rsp false @@ -66,23 +64,21 @@ - <_EmccLinkFlags Include="-s EXPORT_ES6=1" Condition="'$(WasmEnableES6)' == 'true'" /> - <_EmccLinkFlags Include="-s ALLOW_MEMORY_GROWTH=1" /> - <_EmccLinkFlags Include="-s NO_EXIT_RUNTIME=1" /> - <_EmccLinkFlags Include="-s FORCE_FILESYSTEM=1" /> - <_EmccLinkFlags Include="-s EXPORTED_RUNTIME_METHODS="['FS','print','ccall','cwrap','setValue','getValue','UTF8ToString','UTF8ArrayToString','FS_createPath','FS_createDataFile','removeRunDependency','addRunDependency']"" /> - - <_EmccLinkFlags Include="-s EXPORTED_FUNCTIONS=_free,_malloc,_htons,_ntohs,__get_daylight,__get_timezone,__get_tzname,_memalign" /> - <_EmccLinkFlags Include="--source-map-base http://example.com" /> - <_EmccLinkFlags Include="-s STRICT_JS=1" /> - <_EmccLinkFlags Include="-s EXPORT_NAME="'createDotnetRuntime'"" /> - <_EmccLinkFlags Include="-s MODULARIZE=1"/> - <_EmccLinkFlags Include="-Wl,--allow-undefined"/> - <_EmccLinkFlags Include="-s ENVIRONMENT="web,webview,worker,node,shell"" /> + <_EmccCommonFlags Include="-s ALLOW_MEMORY_GROWTH=1" /> + <_EmccCommonFlags Include="-s NO_EXIT_RUNTIME=1" /> + <_EmccCommonFlags Include="-s FORCE_FILESYSTEM=1" /> + <_EmccCommonFlags Include="-s EXPORTED_RUNTIME_METHODS="['FS','print','ccall','cwrap','setValue','getValue','UTF8ToString','UTF8ArrayToString','FS_createPath','FS_createDataFile','removeRunDependency','addRunDependency']"" /> + <_EmccCommonFlags Include="-s EXPORTED_FUNCTIONS="['_free','_malloc']"" /> + <_EmccCommonFlags Include="--source-map-base http://example.com" /> + + <_EmccCommonFlags Include="-s STRICT_JS=1" /> + <_EmccCommonFlags Include="-s EXPORT_NAME="'createDotnetRuntime'"" /> + <_EmccCommonFlags Include="-s MODULARIZE=1"/> + <_EmccCommonFlags Include="-s EXPORT_ES6=1" Condition="'$(WasmEnableES6)' == 'true'" /> - <_EmccLinkFlags Include="--profiling-funcs" /> + <_EmccFlags Include="--profiling-funcs" /> <_EmccFlags Include="@(_EmccCommonFlags)" /> @@ -94,14 +90,6 @@ Lines="@(_EmccFlags)" WriteOnlyWhenDifferent="true" Overwrite="true" /> - - @@ -215,8 +203,6 @@