From ed80ed394d2d2467904a2ae9be31d6bda9703cdf Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 26 Jan 2023 14:29:45 +0100 Subject: [PATCH 01/46] [wasm] Initial emscripten 3.1.30 support --- src/mono/CMakeLists.txt | 1 + src/mono/wasm/emscripten-version.txt | 2 +- src/mono/wasm/runtime/assets.ts | 16 ++++++++-------- src/mono/wasm/runtime/dotnet.d.ts | 4 ++-- src/mono/wasm/runtime/es6/dotnet.es6.lib.js | 4 ++-- src/mono/wasm/runtime/exports-internal.ts | 2 +- src/mono/wasm/runtime/exports.ts | 8 ++++---- src/mono/wasm/runtime/http.ts | 2 +- src/mono/wasm/runtime/icu.ts | 2 +- src/mono/wasm/runtime/invoke-cs.ts | 2 +- src/mono/wasm/runtime/invoke-js.ts | 2 +- src/mono/wasm/runtime/memory.ts | 9 ++++----- src/mono/wasm/runtime/polyfills.ts | 10 +++++----- src/mono/wasm/runtime/run.ts | 6 +++--- src/mono/wasm/runtime/startup.ts | 8 ++++---- src/mono/wasm/runtime/types.ts | 2 +- src/mono/wasm/runtime/types/emscripten.ts | 5 +++-- src/mono/wasm/wasm.proj | 3 ++- src/native/libs/CMakeLists.txt | 2 ++ 19 files changed, 47 insertions(+), 43 deletions(-) diff --git a/src/mono/CMakeLists.txt b/src/mono/CMakeLists.txt index 0cf373b0a621b..a3264aad92536 100644 --- a/src/mono/CMakeLists.txt +++ b/src/mono/CMakeLists.txt @@ -233,6 +233,7 @@ elseif(CLR_CMAKE_HOST_OS STREQUAL "emscripten") add_definitions(-D_THREAD_SAFE) add_compile_options(-Wno-strict-prototypes) add_compile_options(-Wno-unused-but-set-variable) + add_compile_options(-Wno-single-bit-bitfield-constant-conversion) set(DISABLE_EXECUTABLES 1) # FIXME: Is there a cmake option for this ? set(DISABLE_SHARED_LIBS 1) diff --git a/src/mono/wasm/emscripten-version.txt b/src/mono/wasm/emscripten-version.txt index ffbbb67770e65..f4e47c2e5e20a 100644 --- a/src/mono/wasm/emscripten-version.txt +++ b/src/mono/wasm/emscripten-version.txt @@ -1 +1 @@ -3.1.12 \ No newline at end of file +3.1.30 \ No newline at end of file diff --git a/src/mono/wasm/runtime/assets.ts b/src/mono/wasm/runtime/assets.ts index d6bb4d25a9cfc..5704807f01489 100644 --- a/src/mono/wasm/runtime/assets.ts +++ b/src/mono/wasm/runtime/assets.ts @@ -121,17 +121,17 @@ export async function mono_download_assets(): Promise { // and we are not awating it here Promise.all(promises_of_asset_instantiation).then(() => { allAssetsInMemory.promise_control.resolve(); - }).catch(err => { - Module.printErr("MONO_WASM: Error in mono_download_assets: " + err); - abort_startup(err, true); + }).catch(e => { + Module.err("MONO_WASM: Error in mono_download_assets: " + e); + abort_startup(e, true); }); // OPTIMIZATION explained: // we do it this way so that we could allocate memory immediately after asset is downloaded (and after onRuntimeInitialized which happened already) // spreading in time // rather than to block all downloads after onRuntimeInitialized or block onRuntimeInitialized after all downloads are done. That would create allocation burst. - } catch (err: any) { - Module.printErr("MONO_WASM: Error in mono_download_assets: " + err); - throw err; + } catch (e: any) { + Module.err("MONO_WASM: Error in mono_download_assets: " + e); + throw e; } } @@ -283,7 +283,7 @@ async function start_asset_download_sources(asset: AssetEntryInternal): Promise< err.status = response.status; throw err; } else { - Module.print(`MONO_WASM: optional download '${response.url}' for ${asset.name} failed ${response.status} ${response.statusText}`); + Module.out(`MONO_WASM: optional download '${response.url}' for ${asset.name} failed ${response.status} ${response.statusText}`); return undefined; } } @@ -425,7 +425,7 @@ function _instantiate_asset(asset: AssetEntry, url: string, bytes: Uint8Array) { } else if (asset.behavior === "icu") { if (!mono_wasm_load_icu_data(offset!)) - Module.printErr(`MONO_WASM: Error loading ICU asset ${asset.name}`); + Module.err(`MONO_WASM: Error loading ICU asset ${asset.name}`); } else if (asset.behavior === "resource") { cwraps.mono_wasm_add_satellite_assembly(virtualName, asset.culture || "", offset!, bytes.length); diff --git a/src/mono/wasm/runtime/dotnet.d.ts b/src/mono/wasm/runtime/dotnet.d.ts index c51064343d22d..8874b2a4dc91a 100644 --- a/src/mono/wasm/runtime/dotnet.d.ts +++ b/src/mono/wasm/runtime/dotnet.d.ts @@ -45,8 +45,8 @@ declare interface EmscriptenModule { HEAPF64: Float64Array; _malloc(size: number): VoidPtr; _free(ptr: VoidPtr): void; - print(message: string): void; - printErr(message: string): void; + out(message: string): void; + err(message: string): void; ccall(ident: string, returnType?: string | null, argTypes?: string[], args?: any[], opts?: any): T; cwrap(ident: string, returnType: string, argTypes?: string[], opts?: any): T; cwrap(ident: string, ...args: any[]): T; diff --git a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js index fb184f0533ff0..ef6e633d96314 100644 --- a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js +++ b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js @@ -28,7 +28,7 @@ if (${usePThreads}) { __dotnet_replacement_PThread.threadInitTLS = PThread.threadInitTLS; __dotnet_replacement_PThread.allocateUnusedWorker = PThread.allocateUnusedWorker; } -let __dotnet_replacements = {scriptUrl: import.meta.url, fetch: globalThis.fetch, require, updateGlobalBufferAndViews, pthreadReplacements: __dotnet_replacement_PThread}; +let __dotnet_replacements = {scriptUrl: import.meta.url, fetch: globalThis.fetch, require, updateMemoryViews, pthreadReplacements: __dotnet_replacement_PThread}; if (ENVIRONMENT_IS_NODE) { __dotnet_replacements.requirePromise = import(/* webpackIgnore: true */'module').then(mod => mod.createRequire(import.meta.url)); } @@ -36,7 +36,7 @@ let __dotnet_exportedAPI = __dotnet_runtime.__initializeImportsAndExports( { isGlobal:false, isNode:ENVIRONMENT_IS_NODE, isWorker:ENVIRONMENT_IS_WORKER, isShell:ENVIRONMENT_IS_SHELL, isWeb:ENVIRONMENT_IS_WEB, isPThread:${isPThread}, quit_, ExitStatus, requirePromise:__dotnet_replacements.requirePromise }, { mono:MONO, binding:BINDING, internal:INTERNAL, module:Module, marshaled_imports: IMPORTS }, __dotnet_replacements, __callbackAPI); -updateGlobalBufferAndViews = __dotnet_replacements.updateGlobalBufferAndViews; + updateMemoryViews = __dotnet_replacements.updateMemoryViews; var fetch = __dotnet_replacements.fetch; _scriptDir = __dirname = scriptDirectory = __dotnet_replacements.scriptDirectory; if (ENVIRONMENT_IS_NODE) { diff --git a/src/mono/wasm/runtime/exports-internal.ts b/src/mono/wasm/runtime/exports-internal.ts index c3ff6a75d3bbe..0b478ea60556d 100644 --- a/src/mono/wasm/runtime/exports-internal.ts +++ b/src/mono/wasm/runtime/exports-internal.ts @@ -18,7 +18,7 @@ import { getOptions, applyOptions } from "./jiterpreter-support"; export function export_internal(): any { return { // tests - mono_wasm_exit: (exit_code: number) => { Module.printErr("MONO_WASM: early exit " + exit_code); }, + mono_wasm_exit: (exit_code: number) => { Module.err("MONO_WASM: early exit " + exit_code); }, mono_wasm_enable_on_demand_gc: cwraps.mono_wasm_enable_on_demand_gc, mono_wasm_profiler_init_aot: cwraps.mono_wasm_profiler_init_aot, mono_wasm_profiler_init_browser: cwraps.mono_wasm_profiler_init_browser, diff --git a/src/mono/wasm/runtime/exports.ts b/src/mono/wasm/runtime/exports.ts index 1950eb7ae692b..9903165c8af52 100644 --- a/src/mono/wasm/runtime/exports.ts +++ b/src/mono/wasm/runtime/exports.ts @@ -68,11 +68,11 @@ function initializeImportsAndExports( module.configSrc = "./mono-config.json"; } - if (!module.print) { - module.print = console.log.bind(console); + if (!module.out) { + module.out = console.log.bind(console); } - if (!module.printErr) { - module.printErr = console.error.bind(console); + if (!module.err) { + module.err = console.error.bind(console); } if (typeof module.disableDotnet6Compatibility === "undefined") { diff --git a/src/mono/wasm/runtime/http.ts b/src/mono/wasm/runtime/http.ts index 73365d340704d..01a9556e0c62c 100644 --- a/src/mono/wasm/runtime/http.ts +++ b/src/mono/wasm/runtime/http.ts @@ -24,7 +24,7 @@ export function http_wasm_abort_response(res: ResponseExtension): void { if (res.__reader) { res.__reader.cancel().catch((err) => { if (err && err.name !== "AbortError") { - Module.printErr("MONO_WASM: Error in http_wasm_abort_response: " + err); + Module.err("MONO_WASM: Error in http_wasm_abort_response: " + err); } // otherwise, it's expected }); diff --git a/src/mono/wasm/runtime/icu.ts b/src/mono/wasm/runtime/icu.ts index 3e6e7105335c4..77429a797326a 100644 --- a/src/mono/wasm/runtime/icu.ts +++ b/src/mono/wasm/runtime/icu.ts @@ -48,7 +48,7 @@ export function mono_wasm_globalization_init(): void { invariantMode = true; } else { const msg = "invariant globalization mode is inactive and no ICU data archives were loaded"; - Module.printErr(`MONO_WASM: ERROR: ${msg}`); + Module.err(`MONO_WASM: ERROR: ${msg}`); throw new Error(msg); } } diff --git a/src/mono/wasm/runtime/invoke-cs.ts b/src/mono/wasm/runtime/invoke-cs.ts index 5d419ce92defe..2b10b20317ae6 100644 --- a/src/mono/wasm/runtime/invoke-cs.ts +++ b/src/mono/wasm/runtime/invoke-cs.ts @@ -91,7 +91,7 @@ export function mono_wasm_bind_cs_function(fully_qualified_name: MonoStringRef, wrap_no_error_root(is_exception, resultRoot); } catch (ex: any) { - Module.printErr(ex.toString()); + Module.err(ex.toString()); wrap_error_root(is_exception, ex, resultRoot); } finally { resultRoot.release(); diff --git a/src/mono/wasm/runtime/invoke-js.ts b/src/mono/wasm/runtime/invoke-js.ts index 85c1db588554c..3fd1b66156a6c 100644 --- a/src/mono/wasm/runtime/invoke-js.ts +++ b/src/mono/wasm/runtime/invoke-js.ts @@ -90,7 +90,7 @@ export function mono_wasm_bind_js_function(function_name: MonoStringRef, module_ endMeasure(mark, MeasuredBlock.bindJsFunction, js_function_name); } catch (ex: any) { setI32_unchecked(function_js_handle, 0); - Module.printErr(ex.toString()); + Module.err(ex.toString()); wrap_error_root(is_exception, ex, resultRoot); } finally { resultRoot.release(); diff --git a/src/mono/wasm/runtime/memory.ts b/src/mono/wasm/runtime/memory.ts index 083c5caa36f23..3ac10686e6315 100644 --- a/src/mono/wasm/runtime/memory.ts +++ b/src/mono/wasm/runtime/memory.ts @@ -11,7 +11,6 @@ import cwraps, { I52Error } from "./cwraps"; const alloca_stack: Array = []; const alloca_buffer_size = 32 * 1024; let alloca_base: VoidPtr, alloca_offset: VoidPtr, alloca_limit: VoidPtr; -let HEAPI64: BigInt64Array = null; function _ensure_allocated(): void { if (alloca_base) @@ -140,7 +139,7 @@ export function setI64Big(offset: MemOffset, value: bigint): void { mono_assert(typeof value === "bigint", () => `Value is not an bigint: ${value} (${typeof (value)})`); mono_assert(value >= min_int64_big && value <= max_int64_big, () => `Overflow: value ${value} is out of ${min_int64_big} ${max_int64_big} range`); - HEAPI64[offset >>> 3] = value; + Module.HEAP64[offset >>> 3] = value; } export function setF32(offset: MemOffset, value: number): void { @@ -204,7 +203,7 @@ export function getU52(offset: MemOffset): number { export function getI64Big(offset: MemOffset): bigint { mono_assert(is_bigint_supported, "BigInt is not supported."); - return HEAPI64[offset >>> 3]; + return Module.HEAP64[offset >>> 3]; } export function getF32(offset: MemOffset): number { @@ -217,11 +216,11 @@ export function getF64(offset: MemOffset): number { let max_int64_big: BigInt; let min_int64_big: BigInt; -export function afterUpdateGlobalBufferAndViews(buffer: ArrayBufferLike): void { +export function afterUpdateMemoryViews(): void { if (is_bigint_supported) { + // TODO: why do we need to initialize these on memory change? max_int64_big = BigInt("9223372036854775807"); min_int64_big = BigInt("-9223372036854775808"); - HEAPI64 = new BigInt64Array(buffer); } } diff --git a/src/mono/wasm/runtime/polyfills.ts b/src/mono/wasm/runtime/polyfills.ts index 58f1bdd13eec0..6d81e1a3f8c29 100644 --- a/src/mono/wasm/runtime/polyfills.ts +++ b/src/mono/wasm/runtime/polyfills.ts @@ -4,7 +4,7 @@ import BuildConfiguration from "consts:configuration"; import MonoWasmThreads from "consts:monoWasmThreads"; import { ENVIRONMENT_IS_NODE, ENVIRONMENT_IS_SHELL, ENVIRONMENT_IS_WEB, ENVIRONMENT_IS_WORKER, INTERNAL, Module, runtimeHelpers } from "./imports"; -import { afterUpdateGlobalBufferAndViews } from "./memory"; +import { afterUpdateMemoryViews } from "./memory"; import { replaceEmscriptenPThreadLibrary } from "./pthreads/shared/emscripten-replacements"; import { DotnetModuleConfigImports, EarlyReplacements } from "./types"; import { TypedArray } from "./types/emscripten"; @@ -181,10 +181,10 @@ export function init_polyfills(replacements: EarlyReplacements): void { } // memory - const originalUpdateGlobalBufferAndViews = replacements.updateGlobalBufferAndViews; - replacements.updateGlobalBufferAndViews = (buffer: ArrayBufferLike) => { - originalUpdateGlobalBufferAndViews(buffer); - afterUpdateGlobalBufferAndViews(buffer); + const originalUpdateMemoryViews = replacements.updateMemoryViews; + replacements.updateMemoryViews = () => { + originalUpdateMemoryViews(); + afterUpdateMemoryViews(); }; } diff --git a/src/mono/wasm/runtime/run.ts b/src/mono/wasm/runtime/run.ts index 2e624bcf2f181..7fc3729896638 100644 --- a/src/mono/wasm/runtime/run.ts +++ b/src/mono/wasm/runtime/run.ts @@ -111,11 +111,11 @@ function set_exit_code_and_quit_now(exit_code: number, reason?: any): void { if (reason && !(reason instanceof runtimeHelpers.ExitStatus)) { if (!runtimeHelpers.config.logExitCode) { if (reason instanceof Error) - Module.printErr(mono_wasm_stringify_as_error_with_stack(reason)); + Module.err(mono_wasm_stringify_as_error_with_stack(reason)); else if (typeof reason == "string") - Module.printErr(reason); + Module.err(reason); else - Module.printErr(JSON.stringify(reason)); + Module.err(JSON.stringify(reason)); } } else { diff --git a/src/mono/wasm/runtime/startup.ts b/src/mono/wasm/runtime/startup.ts index ea1a58d43ac45..02c203b16c276 100644 --- a/src/mono/wasm/runtime/startup.ts +++ b/src/mono/wasm/runtime/startup.ts @@ -100,7 +100,7 @@ function instantiateWasm( // this is called so early that even Module exports like addRunDependency don't exist yet if (!Module.configSrc && !Module.config && !userInstantiateWasm) { - Module.print("MONO_WASM: configSrc nor config was specified"); + Module.out("MONO_WASM: configSrc nor config was specified"); } if (Module.config) { config = runtimeHelpers.config = Module.config as MonoConfig; @@ -389,10 +389,10 @@ async function mono_wasm_after_user_runtime_initialized(): Promise { function _print_error(message: string, err: any): void { - Module.printErr(`${message}: ${JSON.stringify(err)}`); + Module.err(`${message}: ${JSON.stringify(err)}`); if (err.stack) { - Module.printErr("MONO_WASM: Stacktrace: \n"); - Module.printErr(err.stack); + Module.err("MONO_WASM: Stacktrace: \n"); + Module.err(err.stack); } } diff --git a/src/mono/wasm/runtime/types.ts b/src/mono/wasm/runtime/types.ts index 81739f9a0b3a9..0db100933c0f0 100644 --- a/src/mono/wasm/runtime/types.ts +++ b/src/mono/wasm/runtime/types.ts @@ -361,7 +361,7 @@ export type EarlyReplacements = { require: any, requirePromise: Promise, noExitRuntime: boolean, - updateGlobalBufferAndViews: Function, + updateMemoryViews: Function, pthreadReplacements: PThreadReplacements | undefined | null scriptDirectory: string; scriptUrl: string diff --git a/src/mono/wasm/runtime/types/emscripten.ts b/src/mono/wasm/runtime/types/emscripten.ts index 5dfef8981cbda..7f75ff490f745 100644 --- a/src/mono/wasm/runtime/types/emscripten.ts +++ b/src/mono/wasm/runtime/types/emscripten.ts @@ -26,6 +26,7 @@ export declare interface EmscriptenModule { HEAP8: Int8Array, HEAP16: Int16Array; HEAP32: Int32Array; + HEAP64: BigInt64Array; HEAPU8: Uint8Array; HEAPU16: Uint16Array; HEAPU32: Uint32Array; @@ -37,8 +38,8 @@ export declare interface EmscriptenModule { _free(ptr: VoidPtr): void; // this should match emcc -s EXPORTED_RUNTIME_METHODS - print(message: string): void; - printErr(message: string): void; + out(message: string): void; + err(message: string): void; ccall(ident: string, returnType?: string | null, argTypes?: string[], args?: any[], opts?: any): T; cwrap(ident: string, returnType: string, argTypes?: string[], opts?: any): T; cwrap(ident: string, ...args: any[]): T; diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index dd279ebb54247..7cfe983153ef4 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -117,7 +117,8 @@ - + + diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt index 6dde2f698bda7..088ef3d48852f 100644 --- a/src/native/libs/CMakeLists.txt +++ b/src/native/libs/CMakeLists.txt @@ -156,6 +156,8 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) add_compile_options(-Wno-typedef-redefinition) add_compile_options(-Wno-c11-extensions) add_compile_options(-Wno-thread-safety-analysis) + add_compile_options(-Wno-unsafe-buffer-usage) + add_compile_options(-Wno-cast-function-type-strict) endif () add_subdirectory(System.Native) From 96d59b8d054d43f76fa4c705399f19acff454798 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 10 Feb 2023 12:42:49 +0100 Subject: [PATCH 02/46] Update icu dependency --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index d7c6680aa3dbb..eb45ba7df86a3 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/icu - cb39ef7979da97c65ee27a626eb83b0290216298 + dcc1f6e0e9915468372e4be0474762242bf07d8f https://github.com/dotnet/msquic diff --git a/eng/Versions.props b/eng/Versions.props index 244cd8401d31d..9143729d34691 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -217,7 +217,7 @@ 0.11.4-alpha.23067.1 0.11.4-alpha.23067.1 - 8.0.0-alpha.1.23066.1 + 8.0.0-preview.2.23108.1 2.1.1 7.0.0-alpha.1.22406.1 From 0d522ba580ed68040a522fc30250aae0fdfc2230 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 10 Feb 2023 12:51:02 +0100 Subject: [PATCH 03/46] Update emsdk dependency --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 98919e56f5467..3a6cff62c6777 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -85,9 +85,9 @@ 03108ae78eafab635d07071282ca24b06d23c9ff - + https://github.com/dotnet/emsdk - a117e262c0c49e71a0017e96a0a1124ec990d05f + f55ecf5518e38508a96afc81e5cfc33bbbc76a8d diff --git a/eng/Versions.props b/eng/Versions.props index f267119048db1..37687889ed106 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -237,7 +237,7 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100-preview_2 --> - 8.0.0-preview.2.23108.1 + 8.0.0-preview.2.23107.2 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) 1.1.87-gba258badda From f5a205e0eb0e03fde596d8cc6200a4f81d8cbc57 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 10 Feb 2023 13:41:40 +0100 Subject: [PATCH 04/46] Use new docker images --- eng/pipelines/common/templates/pipeline-with-resources.yml | 4 ++-- eng/pipelines/libraries/helix-queues-setup.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/templates/pipeline-with-resources.yml b/eng/pipelines/common/templates/pipeline-with-resources.yml index 3a357465e714e..4475eeb928e63 100644 --- a/eng/pipelines/common/templates/pipeline-with-resources.yml +++ b/eng/pipelines/common/templates/pipeline-with-resources.yml @@ -58,10 +58,10 @@ resources: ROOTFS_DIR: /crossrootfs/ppc64le - container: browser_wasm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly3130-20230130145247-f7eb839 - container: wasi_wasm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-webassembly + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-webassembly3130-20230130145338-66f9fdd - container: freebsd_x64 image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-freebsd-12 diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index 505d78f0a8cd6..206be044333c2 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -197,6 +197,6 @@ jobs: # Browser WebAssembly windows - ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}: - - (Windows.Amd64.Server2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly + - (Windows.Amd64.Server2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly3130-20230201170008-8b7d579 ${{ insert }}: ${{ parameters.jobParameters }} From 7d2e8eb4c92f2530c7dc370a8b663efab30de48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Mon, 13 Feb 2023 15:04:15 +0100 Subject: [PATCH 05/46] Add "icudt68_dat" as JS imported function. It's an undefined symbol in ICU, because we are not linking in a lib, that should in the end be linked out. Updated version of emscripten has by default turned on the LLD_REPORT_UNDEFINED . --- src/mono/wasm/runtime/es6/dotnet.es6.lib.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js index 0d72c71f974ee..68f3f70f87185 100644 --- a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js +++ b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js @@ -107,6 +107,8 @@ const linked_functions = [ // pal_icushim_static.c "mono_wasm_load_icu_data", "mono_wasm_get_icudt_name", + + "icudt68_dat", #if USE_PTHREADS /// mono-threads-wasm.c From 44ede5e875c588fd3f385dd3478ce69274980396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Tue, 14 Feb 2023 09:18:12 +0100 Subject: [PATCH 06/46] Drop build-time support for undefined icudt68_dat. --- src/mono/wasm/wasm.proj | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 8e70de850520f..35f0f9f739b66 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -32,7 +32,6 @@ <_EmccDefaultsRspPath>$(NativeBinDir)src\emcc-default.rsp <_EmccCompileRspPath>$(NativeBinDir)src\emcc-compile.rsp <_EmccLinkRspPath>$(NativeBinDir)src\emcc-link.rsp - <_EmccLinkUndefinedSymbolsFile>$(WasmObjDir)src\symbols.undefined false @@ -164,6 +163,7 @@ <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> + <_EmccCommonFlags Condition="'$(WasmEnableSIMD)' == 'true'" Include="-msimd128" /> <_EmccCommonFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> <_EmccLinkFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-Wno-pthreads-mem-growth" /> @@ -185,8 +185,6 @@ <_EmccLinkFlags Include="-Wno-limited-postlink-optimizations"/> - - <_EmccLinkUndefinedSymbols Include="icudt68_dat" /> @@ -241,10 +239,6 @@ Lines="@(_EmccLinkFlags)" WriteOnlyWhenDifferent="true" Overwrite="true" /> - @@ -268,7 +262,6 @@ -O2 $(CMakeConfigurationLinkFlags) -s EXPORT_ES6=1 - $(CMakeConfigurationLinkFlags) -Wl,--allow-undefined-file=$(_EmccLinkUndefinedSymbolsFile) $(CMakeConfigurationLinkFlags) -Wno-pthreads-mem-growth $(CMakeConfigurationLinkFlags) --emit-symbol-map From ab5c12ed04e4ca1d57c739d58a396bdf9b138255 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 20 Feb 2023 10:13:34 +0100 Subject: [PATCH 07/46] Fix linker options Should be `--lto-O0` --- eng/testing/tests.browser.targets | 2 +- eng/testing/tests.wasi.targets | 2 +- eng/testing/tests.wasm.targets | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/testing/tests.browser.targets b/eng/testing/tests.browser.targets index 80cd51f997008..dd104e6890e78 100644 --- a/eng/testing/tests.browser.targets +++ b/eng/testing/tests.browser.targets @@ -188,7 +188,7 @@ <_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == $(AssemblyName) and '%(WasmAssembliesToBundle.Extension)' == '.dll'">%(WasmAssembliesToBundle.Identity) $([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json')) - -Oz -Wl,-O0 -Wl,-lto-O0 + -Oz -Wl,-O0 -Wl,--lto-O0 diff --git a/eng/testing/tests.wasi.targets b/eng/testing/tests.wasi.targets index 5cfcef5eb9ebd..70ec193732d09 100644 --- a/eng/testing/tests.wasi.targets +++ b/eng/testing/tests.wasi.targets @@ -155,7 +155,7 @@ <_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == $(AssemblyName) and '%(WasmAssembliesToBundle.Extension)' == '.dll'">%(WasmAssembliesToBundle.Identity) $([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json')) - -Oz -Wl,-O0 -Wl,-lto-O0 + -Oz -Wl,-O0 -Wl,--lto-O0 diff --git a/eng/testing/tests.wasm.targets b/eng/testing/tests.wasm.targets index 6516302093b32..ec0ec0f390bb1 100644 --- a/eng/testing/tests.wasm.targets +++ b/eng/testing/tests.wasm.targets @@ -97,7 +97,7 @@ <_MainAssemblyPath Condition="'%(WasmAssembliesToBundle.FileName)' == $(AssemblyName) and '%(WasmAssembliesToBundle.Extension)' == '.dll'">%(WasmAssembliesToBundle.Identity) $([System.IO.Path]::ChangeExtension($(_MainAssemblyPath), '.runtimeconfig.json')) - -O1 -Wl,-O0 -Wl,-lto-O0 + -O1 -Wl,-O0 -Wl,--lto-O0 true From e275857fe7e786f2d467f387476edc1f5c0edbba Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 20 Feb 2023 11:20:55 +0100 Subject: [PATCH 08/46] Fix remaining conflict --- eng/Versions.props | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 65e1ca6780096..4196ccb44b73b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -238,11 +238,7 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100-preview_2 --> -<<<<<<< HEAD 8.0.0-preview.2.23107.2 -======= - 8.0.0-preview.2.23113.1 ->>>>>>> remotes/origin/main $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) 1.1.87-gba258badda From 54dfd24bfba95d0ce69636fa808dc3c9589b6af4 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 20 Feb 2023 13:02:25 +0100 Subject: [PATCH 09/46] Limit new warnings option to browser --- src/native/libs/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/native/libs/CMakeLists.txt b/src/native/libs/CMakeLists.txt index 6ec0f3896a144..12ba766e530a3 100644 --- a/src/native/libs/CMakeLists.txt +++ b/src/native/libs/CMakeLists.txt @@ -156,8 +156,10 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) add_compile_options(-Wno-typedef-redefinition) add_compile_options(-Wno-c11-extensions) add_compile_options(-Wno-thread-safety-analysis) - add_compile_options(-Wno-unsafe-buffer-usage) - add_compile_options(-Wno-cast-function-type-strict) + if (CLR_CMAKE_TARGET_BROWSER) + add_compile_options(-Wno-unsafe-buffer-usage) + add_compile_options(-Wno-cast-function-type-strict) + endif () endif () add_subdirectory(System.Native) From c302891a115ab2c3d229e54a71100d23277ad77e Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 20 Feb 2023 17:14:37 +0100 Subject: [PATCH 10/46] Try to force reinstall of certifi --- eng/pipelines/mono/update-machine-certs.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/mono/update-machine-certs.ps1 b/eng/pipelines/mono/update-machine-certs.ps1 index 21c3da4eac625..0f6bfd50b8e19 100644 --- a/eng/pipelines/mono/update-machine-certs.ps1 +++ b/eng/pipelines/mono/update-machine-certs.ps1 @@ -1,6 +1,6 @@ # This seems to update the machine cert store so that python can download the files as required by emscripten's install # Based on info at https://pypi.org/project/certifi/ -pip install certifi +pip install --force-reinstall certifi $WebsiteURL="storage.googleapis.com" Try { From 9f145a3ec35cf4a9455a011f0195d17b1e65ab94 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 21 Feb 2023 20:52:53 +0100 Subject: [PATCH 11/46] Unset `FROZEN_CACHE` for `embuilder build MINIMAL` --- src/mono/wasm/build/WasmApp.Native.targets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 112e861724728..68c7b768832fe 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -325,10 +325,12 @@ + + - + From d6f6a4ef2d9b4a83bd68bc19f9bd7c8f8510cb52 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 22 Feb 2023 19:23:05 +0100 Subject: [PATCH 12/46] Update emsdk deps --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b7a74c49d569f..7a0b0c85ac673 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -85,18 +85,18 @@ 68e0c35d0b4b6651b9a062a52e7dd694d7a43927 - + https://github.com/dotnet/emsdk - f55ecf5518e38508a96afc81e5cfc33bbbc76a8d + 9c29816837eef223f56f148e807f0e881fb3f6b4 - + https://github.com/dotnet/emsdk - a117e262c0c49e71a0017e96a0a1124ec990d05f + 9c29816837eef223f56f148e807f0e881fb3f6b4 - + https://github.com/dotnet/emsdk - a117e262c0c49e71a0017e96a0a1124ec990d05f + 9c29816837eef223f56f148e807f0e881fb3f6b4 diff --git a/eng/Versions.props b/eng/Versions.props index 4196ccb44b73b..f7ff290ecef15 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -238,7 +238,7 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100-preview_2 --> - 8.0.0-preview.2.23107.2 + 8.0.0-preview.2.23122.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) 1.1.87-gba258badda From 5067a1d5ad9a825d333a41b1ba0455bf8b8709c9 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 24 Feb 2023 13:05:16 +0100 Subject: [PATCH 13/46] Remove assert for stack address The linker puts stack at 0 sometime, so just check that the stack size is not zero. --- src/mono/mono/utils/mono-threads.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mono/mono/utils/mono-threads.c b/src/mono/mono/utils/mono-threads.c index 2ef2fe45b1be2..07c8715342c2e 100644 --- a/src/mono/mono/utils/mono-threads.c +++ b/src/mono/mono/utils/mono-threads.c @@ -511,7 +511,6 @@ register_thread (MonoThreadInfo *info) mono_native_tls_set_value (thread_info_key, info); mono_thread_info_get_stack_bounds (&staddr, &stsize); - g_assert (staddr); g_assert (stsize); info->stack_start_limit = staddr; info->stack_end = staddr + stsize; From 0bb6b01ccd1c4394d1cfbc13d243adb174e80e98 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 27 Feb 2023 15:36:31 +0100 Subject: [PATCH 14/46] Get back the stack base assert For non-wasm targets. Add comment. --- src/mono/mono/utils/mono-threads.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mono/mono/utils/mono-threads.c b/src/mono/mono/utils/mono-threads.c index 07c8715342c2e..026c290fb3224 100644 --- a/src/mono/mono/utils/mono-threads.c +++ b/src/mono/mono/utils/mono-threads.c @@ -511,6 +511,11 @@ register_thread (MonoThreadInfo *info) mono_native_tls_set_value (thread_info_key, info); mono_thread_info_get_stack_bounds (&staddr, &stsize); + + /* for wasm, the stack can be placed at the start of the linear memory */ +#ifndef TARGET_WASM + g_assert (staddr); +#endif g_assert (stsize); info->stack_start_limit = staddr; info->stack_end = staddr + stsize; From 04a83eb840c2fc3de8f48485b91312f542e20a0b Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 27 Feb 2023 18:59:37 +0100 Subject: [PATCH 15/46] Set stack size to 5MB Which was the default size in older emscripten versions. Let see if it is related to some of the issues. --- src/mono/wasm/wasm.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 35f0f9f739b66..40ccd7af119c7 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -163,6 +163,7 @@ <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> + <_EmccLinkFlags Include="-s STACK_SIZE=5MB" /> <_EmccCommonFlags Condition="'$(WasmEnableSIMD)' == 'true'" Include="-msimd128" /> <_EmccCommonFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> From eb544bd31058c5d44a4a20e90cb1d419b53b19b6 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 27 Feb 2023 19:14:39 +0100 Subject: [PATCH 16/46] Disable WBT tests with SkiSharp context: https://github.com/dotnet/runtime/issues/82725 --- src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs index fd3ccf5bffb84..268b327ef51fd 100644 --- a/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs @@ -51,6 +51,7 @@ public void ProjectWithNativeReference(BuildArgs buildArgs, RunHost host, string [Theory] [BuildAndRun(aot: false)] [BuildAndRun(aot: true)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/82725")] public void ProjectUsingSkiaSharp(BuildArgs buildArgs, RunHost host, string id) { string projectName = $"AppUsingSkiaSharp"; From 8b4a6e2b021d37ead25b026cec275213f30e0314 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 28 Feb 2023 16:56:11 +0100 Subject: [PATCH 17/46] Disable more WBT tests with SkiSharp --- src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs | 1 + src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs index 3b670a42aa07f..9d7cdec30e6eb 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs @@ -84,6 +84,7 @@ public void DefaultTemplate_NoAOT_WithWorkload(string config) [Theory] [InlineData("Debug")] [InlineData("Release")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/82725")] public async Task WithDllImportInMainAssembly(string config) { // Based on https://github.com/dotnet/runtime/issues/59255 diff --git a/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs b/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs index 7fa5eb2475e43..b0fe6baf2e920 100644 --- a/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs +++ b/src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs @@ -20,6 +20,7 @@ public NativeRefTests(ITestOutputHelper output, SharedBuildPerTestClassFixture b [Theory] [InlineData("Debug")] [InlineData("Release")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/82725")] public void WithNativeReference_AOTInProjectFile(string config) { string id = $"blz_nativeref_aot_{config}_{Path.GetRandomFileName()}"; @@ -41,6 +42,7 @@ public void WithNativeReference_AOTInProjectFile(string config) [Theory] [InlineData("Debug")] [InlineData("Release")] + [ActiveIssue("https://github.com/dotnet/runtime/issues/82725")] public void WithNativeReference_AOTOnCommandLine(string config) { string id = $"blz_nativeref_aot_{config}_{Path.GetRandomFileName()}"; From 6e8bd62a8caa1831d09997c74fe08f4ebdea33b4 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 28 Feb 2023 17:02:50 +0100 Subject: [PATCH 18/46] Set the stack size also in native targets --- src/mono/wasm/build/WasmApp.Native.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 68c7b768832fe..9b61ea1bd29f8 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -424,6 +424,7 @@ <_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> + <_EmccLDSFlags Include="-s STACK_SIZE=5MB" /> <_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" /> <_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompile.ObjectFile)" /> From df724b5f7d91f1df184e8d794bc2004618d0b59a Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 1 Mar 2023 10:48:31 +0100 Subject: [PATCH 19/46] Update icu deps --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9cb9b1dee3823..9f04847827707 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/icu - dcc1f6e0e9915468372e4be0474762242bf07d8f + e661b4344e89185d1fc97387042af58bd04f6ebe https://github.com/dotnet/msquic diff --git a/eng/Versions.props b/eng/Versions.props index e93b7748be273..e7193042b3d24 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -219,7 +219,7 @@ 0.11.4-alpha.23113.1 - 8.0.0-preview.2.23108.1 + 8.0.0-preview.3.23128.1 2.1.1 8.0.0-alpha.1.23107.1 From 2d67a1fdfef41cd19f87a446564412e7c0818840 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 1 Mar 2023 11:03:32 +0100 Subject: [PATCH 20/46] Update emsdk deps --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 9f04847827707..04116749dece5 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -85,18 +85,18 @@ 68e0c35d0b4b6651b9a062a52e7dd694d7a43927 - + https://github.com/dotnet/emsdk - 9c29816837eef223f56f148e807f0e881fb3f6b4 + 9caae336ae0eade717689fa3b75f23de226811f4 - + https://github.com/dotnet/emsdk - 9c29816837eef223f56f148e807f0e881fb3f6b4 + 9caae336ae0eade717689fa3b75f23de226811f4 - + https://github.com/dotnet/emsdk - 9c29816837eef223f56f148e807f0e881fb3f6b4 + 9caae336ae0eade717689fa3b75f23de226811f4 diff --git a/eng/Versions.props b/eng/Versions.props index e7193042b3d24..8459e232b4f03 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -238,10 +238,10 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100-preview_2 --> - 8.0.0-preview.2.23122.1 - $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version) - 8.0.0-preview.3.23127.2 - 8.0.0-preview.3.23127.2 + 8.0.0-preview.3.23128.1 + 8.0.0-preview.3.23128.1 + 8.0.0-preview.3.23128.1 + $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview3Version) 1.1.87-gba258badda 1.0.0-v3.14.0.5722 From e6ecd14861733a2f7b130e93bcafa8a8dc66c659 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 1 Mar 2023 17:20:46 +0100 Subject: [PATCH 21/46] Enable BigInt support Co-authored-by: pavelsavara --- src/mono/wasm/build/WasmApp.Native.targets | 1 + src/mono/wasm/runtime/memory.ts | 15 ++------------- src/mono/wasm/runtime/polyfills.ts | 2 -- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 9b61ea1bd29f8..af7ab86b96d99 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -425,6 +425,7 @@ <_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> <_EmccLDSFlags Include="-s STACK_SIZE=5MB" /> + <_EmccLDSFlags Include="-s WASM_BIGINT=1" /> <_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" /> <_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompile.ObjectFile)" /> diff --git a/src/mono/wasm/runtime/memory.ts b/src/mono/wasm/runtime/memory.ts index 029ad1dd2d10e..f793b62b5916a 100644 --- a/src/mono/wasm/runtime/memory.ts +++ b/src/mono/wasm/runtime/memory.ts @@ -20,7 +20,8 @@ function _ensure_allocated(): void { alloca_limit = (alloca_base + alloca_buffer_size); } -const is_bigint_supported = typeof BigInt !== "undefined" && typeof BigInt64Array !== "undefined"; +const max_int64_big = BigInt("9223372036854775807"); +const min_int64_big = BigInt("-9223372036854775808"); export function temp_malloc(size: number): VoidPtr { _ensure_allocated(); @@ -135,7 +136,6 @@ export function setU52(offset: MemOffset, value: number): void { } export function setI64Big(offset: MemOffset, value: bigint): void { - mono_assert(is_bigint_supported, "BigInt is not supported."); mono_assert(typeof value === "bigint", () => `Value is not an bigint: ${value} (${typeof (value)})`); mono_assert(value >= min_int64_big && value <= max_int64_big, () => `Overflow: value ${value} is out of ${min_int64_big} ${max_int64_big} range`); @@ -202,7 +202,6 @@ export function getU52(offset: MemOffset): number { } export function getI64Big(offset: MemOffset): bigint { - mono_assert(is_bigint_supported, "BigInt is not supported."); return Module.HEAP64[offset >>> 3]; } @@ -214,16 +213,6 @@ export function getF64(offset: MemOffset): number { return Module.HEAPF64[offset >>> 3]; } -let max_int64_big: BigInt; -let min_int64_big: BigInt; -export function afterUpdateMemoryViews(): void { - if (is_bigint_supported) { - // TODO: why do we need to initialize these on memory change? - max_int64_big = BigInt("9223372036854775807"); - min_int64_big = BigInt("-9223372036854775808"); - } -} - export function getCU64(offset: MemOffset): cuint64.CUInt64 { const lo = getU32(offset); const hi = getU32(offset + 4); diff --git a/src/mono/wasm/runtime/polyfills.ts b/src/mono/wasm/runtime/polyfills.ts index 84ec45afc4906..fd1f0e70983d0 100644 --- a/src/mono/wasm/runtime/polyfills.ts +++ b/src/mono/wasm/runtime/polyfills.ts @@ -4,7 +4,6 @@ import BuildConfiguration from "consts:configuration"; import MonoWasmThreads from "consts:monoWasmThreads"; import { ENVIRONMENT_IS_NODE, ENVIRONMENT_IS_SHELL, ENVIRONMENT_IS_WEB, ENVIRONMENT_IS_WORKER, INTERNAL, Module, runtimeHelpers } from "./imports"; -import { afterUpdateMemoryViews } from "./memory"; import { replaceEmscriptenPThreadLibrary } from "./pthreads/shared/emscripten-replacements"; import { DotnetModuleConfigImports, EarlyReplacements } from "./types"; import { TypedArray } from "./types/emscripten"; @@ -179,7 +178,6 @@ export function init_polyfills(replacements: EarlyReplacements): void { const originalUpdateMemoryViews = replacements.updateMemoryViews; replacements.updateMemoryViews = () => { originalUpdateMemoryViews(); - afterUpdateMemoryViews(); }; } From 918a47a761c565db65d730e414eabb90b04205cb Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 1 Mar 2023 17:22:59 +0100 Subject: [PATCH 22/46] Enable BigInt here as well --- src/mono/wasm/wasm.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 40ccd7af119c7..e3420e7fe9e7b 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -179,6 +179,7 @@ <_EmccLinkFlags Include="-s EXPORTED_FUNCTIONS=$(_EmccExportedFunctions)" /> <_EmccLinkFlags Include="--source-map-base http://example.com" /> <_EmccLinkFlags Include="-s STRICT_JS=1" /> + <_EmccLinkFlags Include="-s WASM_BIGINT=1" /> <_EmccLinkFlags Include="-s EXPORT_NAME="'createDotnetRuntime'"" /> <_EmccLinkFlags Include="-s MODULARIZE=1"/> From b7999ebfbcdbb0a977f19fa2f48f23b728a0c47f Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 2 Mar 2023 14:21:50 +0100 Subject: [PATCH 23/46] Temporarily allow undefined symbols To unblock other work. After merge of main we are now again getting linker errors with: .nuget/packages/microsoft.netcore.runtime.icu.transport/8.0.0-preview.3.23128.1/runtimes/browser-wasm/native/lib/libicuuc.a(udata.ao): undefined symbol: icudt68_dat --- src/mono/wasm/wasm.proj | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 5c8ee72faff34..7deb6fcc95ebb 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -232,6 +232,7 @@ <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> <_EmccLinkFlags Include="-s STACK_SIZE=5MB" /> + <_EmccLinkFlags Include="-Wl,--allow-undefined" /> <_EmccCommonFlags Condition="'$(WasmEnableSIMD)' == 'true'" Include="-msimd128" /> <_EmccCommonFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> <_EmccLinkFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-Wno-pthreads-mem-growth" /> From 4f5b21613fd6f958e50af0e582143941714b3c31 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 2 Mar 2023 19:35:46 +0100 Subject: [PATCH 24/46] Try to use pip-system-certs package Co-authored-by: Ankit Jain --- eng/pipelines/mono/update-machine-certs.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/mono/update-machine-certs.ps1 b/eng/pipelines/mono/update-machine-certs.ps1 index 0f6bfd50b8e19..36e4b8cb91431 100644 --- a/eng/pipelines/mono/update-machine-certs.ps1 +++ b/eng/pipelines/mono/update-machine-certs.ps1 @@ -1,6 +1,7 @@ # This seems to update the machine cert store so that python can download the files as required by emscripten's install # Based on info at https://pypi.org/project/certifi/ -pip install --force-reinstall certifi +pip install certifi +pip install pip-system-certs $WebsiteURL="storage.googleapis.com" Try { From 0b3ce3cd47cede3443f7d135a50c1182cf1ef2bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Fi=C5=A1era?= Date: Fri, 3 Mar 2023 10:12:32 +0100 Subject: [PATCH 25/46] Fix merge damage for marking "icudt68_dat" a JS imported function + revert temporal fix. --- src/mono/wasm/runtime/es6/dotnet.es6.lib.js | 2 ++ src/mono/wasm/wasm.proj | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js index 41d0c1729a635..291a4addd1572 100644 --- a/src/mono/wasm/runtime/es6/dotnet.es6.lib.js +++ b/src/mono/wasm/runtime/es6/dotnet.es6.lib.js @@ -106,6 +106,8 @@ const linked_functions = [ // pal_icushim_static.c "mono_wasm_load_icu_data", + + "icudt68_dat", #if USE_PTHREADS /// mono-threads-wasm.c diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 7deb6fcc95ebb..bedc492f52adc 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -231,8 +231,6 @@ <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> <_EmccLinkFlags Include="-s STACK_SIZE=5MB" /> - - <_EmccLinkFlags Include="-Wl,--allow-undefined" /> <_EmccCommonFlags Condition="'$(WasmEnableSIMD)' == 'true'" Include="-msimd128" /> <_EmccCommonFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> <_EmccLinkFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-Wno-pthreads-mem-growth" /> From 053f2d3990dcf79c53109c174d415b574b6ec413 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 3 Mar 2023 15:40:24 +0100 Subject: [PATCH 26/46] Try another python certifi package --- eng/pipelines/mono/update-machine-certs.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/mono/update-machine-certs.ps1 b/eng/pipelines/mono/update-machine-certs.ps1 index 36e4b8cb91431..89f3347bfeb49 100644 --- a/eng/pipelines/mono/update-machine-certs.ps1 +++ b/eng/pipelines/mono/update-machine-certs.ps1 @@ -1,7 +1,7 @@ # This seems to update the machine cert store so that python can download the files as required by emscripten's install # Based on info at https://pypi.org/project/certifi/ pip install certifi -pip install pip-system-certs +pip install python-certifi-win32 $WebsiteURL="storage.googleapis.com" Try { From a97768260c51411933d47e3d6d0956029e204270 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 6 Mar 2023 15:03:27 +0100 Subject: [PATCH 27/46] Try install pip-system-certs for emsdk's python --- src/mono/mono.proj | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mono/mono.proj b/src/mono/mono.proj index 5a5694994b0c6..695064cc7663b 100644 --- a/src/mono/mono.proj +++ b/src/mono/mono.proj @@ -153,6 +153,7 @@ $(EMSDK_PATH)/emsdk$(EmsdkExt) activate $(EmscriptenVersion) powershell -NonInteractive -command "& $(InstallCmd); Exit $LastExitCode " powershell -NonInteractive -command "& $(ActivateCmd); Exit $LastExitCode " + setlocal EnableDelayedExpansion && call "$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))" && !EMSDK_PYTHON! @@ -162,6 +163,10 @@ + From 1e02d7c49adfc1a5668ced44569d36b938b0d32b Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 6 Mar 2023 16:16:43 +0100 Subject: [PATCH 28/46] Try to update machine certs for www.sqlite.org --- eng/pipelines/mono/update-machine-certs.ps1 | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/eng/pipelines/mono/update-machine-certs.ps1 b/eng/pipelines/mono/update-machine-certs.ps1 index 89f3347bfeb49..3fe15595ddfd5 100644 --- a/eng/pipelines/mono/update-machine-certs.ps1 +++ b/eng/pipelines/mono/update-machine-certs.ps1 @@ -27,3 +27,28 @@ Try { Write-Host "Status:" $_.exception.innerexception.message -ForegroundColor Yellow Write-Host "" } + +$WebsiteURL="www.sqlite.org" +Try { + $Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) + + Try { + $Stream = New-Object System.Net.Security.SslStream($Conn.GetStream()) + $Stream.AuthenticateAsClient($WebsiteURL) + + $Cert = $Stream.Get_RemoteCertificate() + + $ValidTo = [datetime]::Parse($Cert.GetExpirationDatestring()) + + Write-Host "`nConnection Successful" -ForegroundColor DarkGreen + Write-Host "Website: $WebsiteURL" + } + Catch { Throw $_ } + Finally { $Conn.close() } + } + Catch { + Write-Host "`nError occurred connecting to $($WebsiteURL)" -ForegroundColor Yellow + Write-Host "Website: $WebsiteURL" + Write-Host "Status:" $_.exception.innerexception.message -ForegroundColor Yellow + Write-Host "" +} From e8f080b722845a680f1e10cef93d081f7169a4e0 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Mon, 6 Mar 2023 20:56:54 +0100 Subject: [PATCH 29/46] Refactor + upgrade pip Also use the newer pip-system-certs again --- eng/pipelines/mono/update-machine-certs.ps1 | 70 ++++++++------------- 1 file changed, 27 insertions(+), 43 deletions(-) diff --git a/eng/pipelines/mono/update-machine-certs.ps1 b/eng/pipelines/mono/update-machine-certs.ps1 index 3fe15595ddfd5..e0c877c168999 100644 --- a/eng/pipelines/mono/update-machine-certs.ps1 +++ b/eng/pipelines/mono/update-machine-certs.ps1 @@ -1,54 +1,38 @@ # This seems to update the machine cert store so that python can download the files as required by emscripten's install # Based on info at https://pypi.org/project/certifi/ -pip install certifi -pip install python-certifi-win32 +python -m pip install --upgrade pip +pip install --upgrade certifi pip-system-certs -$WebsiteURL="storage.googleapis.com" -Try { - $Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) +function UpdateSite { - Try { - $Stream = New-Object System.Net.Security.SslStream($Conn.GetStream()) - $Stream.AuthenticateAsClient($WebsiteURL) - - $Cert = $Stream.Get_RemoteCertificate() - - $ValidTo = [datetime]::Parse($Cert.GetExpirationDatestring()) - - Write-Host "`nConnection Successful" -ForegroundColor DarkGreen - Write-Host "Website: $WebsiteURL" - } - Catch { Throw $_ } - Finally { $Conn.close() } - } - Catch { - Write-Host "`nError occurred connecting to $($WebsiteURL)" -ForegroundColor Yellow - Write-Host "Website: $WebsiteURL" - Write-Host "Status:" $_.exception.innerexception.message -ForegroundColor Yellow - Write-Host "" -} - -$WebsiteURL="www.sqlite.org" -Try { - $Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) + param ( + $WebsiteURL + ) Try { - $Stream = New-Object System.Net.Security.SslStream($Conn.GetStream()) - $Stream.AuthenticateAsClient($WebsiteURL) + $Conn = New-Object System.Net.Sockets.TcpClient($WebsiteURL,443) - $Cert = $Stream.Get_RemoteCertificate() + Try { + $Stream = New-Object System.Net.Security.SslStream($Conn.GetStream()) + $Stream.AuthenticateAsClient($WebsiteURL) - $ValidTo = [datetime]::Parse($Cert.GetExpirationDatestring()) + $Cert = $Stream.Get_RemoteCertificate() - Write-Host "`nConnection Successful" -ForegroundColor DarkGreen - Write-Host "Website: $WebsiteURL" - } - Catch { Throw $_ } - Finally { $Conn.close() } - } - Catch { - Write-Host "`nError occurred connecting to $($WebsiteURL)" -ForegroundColor Yellow + $ValidTo = [datetime]::Parse($Cert.GetExpirationDatestring()) + + Write-Host "`nConnection Successful" -ForegroundColor DarkGreen Write-Host "Website: $WebsiteURL" - Write-Host "Status:" $_.exception.innerexception.message -ForegroundColor Yellow - Write-Host "" + } + Catch { Throw $_ } + Finally { $Conn.close() } + } + Catch { + Write-Host "`nError occurred connecting to $($WebsiteURL)" -ForegroundColor Yellow + Write-Host "Website: $WebsiteURL" + Write-Host "Status:" $_.exception.innerexception.message -ForegroundColor Yellow + Write-Host "" + } } + +UpdateSite("storage.googleapis.com") +UpdateSite("www.sqlite.org") From 031511d452f64c513442de28169bb81369ce631e Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 8 Mar 2023 17:18:07 +0100 Subject: [PATCH 30/46] Use new net8 images --- eng/pipelines/common/templates/pipeline-with-resources.yml | 4 ++-- eng/pipelines/libraries/helix-queues-setup.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/common/templates/pipeline-with-resources.yml b/eng/pipelines/common/templates/pipeline-with-resources.yml index 4475eeb928e63..5a1e501bb5d7b 100644 --- a/eng/pipelines/common/templates/pipeline-with-resources.yml +++ b/eng/pipelines/common/templates/pipeline-with-resources.yml @@ -58,10 +58,10 @@ resources: ROOTFS_DIR: /crossrootfs/ppc64le - container: browser_wasm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly3130-20230130145247-f7eb839 + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-webassembly-net8 - container: wasi_wasm - image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-webassembly3130-20230130145338-66f9fdd + image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-20.04-webassembly-net8 - container: freebsd_x64 image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-cross-freebsd-12 diff --git a/eng/pipelines/libraries/helix-queues-setup.yml b/eng/pipelines/libraries/helix-queues-setup.yml index f5e1777d1bbc7..7413b22e51e5b 100644 --- a/eng/pipelines/libraries/helix-queues-setup.yml +++ b/eng/pipelines/libraries/helix-queues-setup.yml @@ -201,6 +201,6 @@ jobs: # Browser WebAssembly windows - ${{ if in(parameters.platform, 'browser_wasm_win', 'wasi_wasm_win') }}: - - (Windows.Amd64.Server2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly3130-20230201170008-8b7d579 + - (Windows.Amd64.Server2022.Open)windows.amd64.server2022.open@mcr.microsoft.com/dotnet-buildtools/prereqs:windowsservercore-ltsc2022-helix-webassembly-net8 ${{ insert }}: ${{ parameters.jobParameters }} From 889d0366e4438880029c85ac800d4403f713dfff Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 8 Mar 2023 17:24:24 +0100 Subject: [PATCH 31/46] Add `-s INCOMING_MODULE_JS_API=print,printErr` --- src/mono/wasm/build/WasmApp.Native.targets | 1 + src/mono/wasm/wasm.proj | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index abc19b8ce321c..c997e595208f4 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -451,6 +451,7 @@ <_EmccLinkStepArgs Include="-s EXPORTED_RUNTIME_METHODS=$(_EmccExportedRuntimeMethods)" /> <_EmccLinkStepArgs Include="-s EXPORTED_FUNCTIONS=$(_EmccExportedFunctions)" /> + <_EmccLinkStepArgs Include="-s INCOMING_MODULE_JS_API=print,printErr" /> <_EmccLinkStepArgs Include="$(EmccExtraLDFlags)" /> diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 24efc9bb92815..1875b3a886591 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -244,6 +244,7 @@ <_EmccLinkFlags Include="-s FORCE_FILESYSTEM=1" /> <_EmccLinkFlags Include="-s EXPORTED_RUNTIME_METHODS=$(_EmccExportedRuntimeMethods)" /> <_EmccLinkFlags Include="-s EXPORTED_FUNCTIONS=$(_EmccExportedFunctions)" /> + <_EmccLinkFlags Include="-s INCOMING_MODULE_JS_API=print,printErr" /> <_EmccLinkFlags Include="--source-map-base http://example.com" /> <_EmccLinkFlags Include="-s STRICT_JS=1" /> <_EmccLinkFlags Include="-s WASM_BIGINT=1" /> From f67ea5e303421bb89f5521f425f22a82aa5d6f46 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 8 Mar 2023 17:32:20 +0100 Subject: [PATCH 32/46] Introduce EmccStackSize msbuild property --- src/mono/wasm/build/WasmApp.Native.targets | 3 ++- src/mono/wasm/build/WasmApp.targets | 4 +++- src/mono/wasm/wasm.proj | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index c997e595208f4..17016dd9f8ee0 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -187,6 +187,7 @@ <_EmccLinkRsp>$(_WasmIntermediateOutputPath)emcc-link.rsp $(EmccTotalMemory) + 5MB false @@ -422,7 +423,7 @@ <_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> - <_EmccLDSFlags Include="-s STACK_SIZE=5MB" /> + <_EmccLDSFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> <_EmccLDSFlags Include="-s WASM_BIGINT=1" /> <_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" /> diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 8eaecaf217364..7f9feb659e2ce 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -50,8 +50,10 @@ - $(EmccExtraLDFlags) - Extra emcc flags for linking - $(EmccExtraCFlags) - Extra emcc flags for compiling native files - $(EmccInitialHeapSize) - Initial heap size specified with `emcc`. Default value: 16777216 or size of the DLLs, whichever is larger. - Corresponds to `INITIAL_MEMORY` arg for emcc. + Corresponds to `-s INITIAL_MEMORY=...` emcc arg. (previously named EmccTotalMemory, which is still kept as an alias) + - $(EmccStackSize) - Stack size. Default value: 5MB. + Corresponds to `-s STACK_SIZE=...` emcc arg. - $(WasmBuildAppAfterThisTarget) - This target is used as `AfterTargets` for `WasmBuildApp. this is what triggers the wasm app building. Defaults to `Build`. diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index 1875b3a886591..31c63cf996af5 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -228,10 +228,11 @@ <_EmccExportedRuntimeMethods>"[@(EmccExportedRuntimeMethod -> '%27%(Identity)%27', ',')]" <_EmccExportedFunctions>@(EmccExportedFunction -> '%(Identity)',',') 16777216 + 5MB <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> - <_EmccLinkFlags Include="-s STACK_SIZE=5MB" /> + <_EmccLinkFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> <_EmccCommonFlags Condition="'$(WasmEnableSIMD)' == 'true'" Include="-msimd128" /> <_EmccCommonFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> <_EmccLinkFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-Wno-pthreads-mem-growth" /> From c179e40582e6d2bd651bf5f6b1f02fc6d21ffb02 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 8 Mar 2023 18:33:39 +0100 Subject: [PATCH 33/46] Remove FIXME from merge We don't have afterUpdateGlobalBufferAndViews anymore --- src/mono/wasm/runtime/polyfills.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/mono/wasm/runtime/polyfills.ts b/src/mono/wasm/runtime/polyfills.ts index adb96e121fb97..ee6899440048e 100644 --- a/src/mono/wasm/runtime/polyfills.ts +++ b/src/mono/wasm/runtime/polyfills.ts @@ -177,8 +177,6 @@ export function init_polyfills(replacements: EarlyReplacements): void { const originalUpdateMemoryViews = replacements.updateMemoryViews; runtimeHelpers.updateMemoryViews = () => { originalUpdateMemoryViews(); - // FIXME - // afterUpdateGlobalBufferAndViews(buffer); }; } From d2ee7425ce79875fd9ed8e59af078f6a110939c0 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 8 Mar 2023 23:02:33 +0100 Subject: [PATCH 34/46] Fixes around updateMemoryViews --- src/mono/wasm/runtime/polyfills.ts | 2 +- src/mono/wasm/runtime/types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/runtime/polyfills.ts b/src/mono/wasm/runtime/polyfills.ts index ee6899440048e..78fdd1f345bbf 100644 --- a/src/mono/wasm/runtime/polyfills.ts +++ b/src/mono/wasm/runtime/polyfills.ts @@ -175,7 +175,7 @@ export function init_polyfills(replacements: EarlyReplacements): void { // memory const originalUpdateMemoryViews = replacements.updateMemoryViews; - runtimeHelpers.updateMemoryViews = () => { + runtimeHelpers.updateMemoryViews = replacements.updateMemoryViews = () => { originalUpdateMemoryViews(); }; } diff --git a/src/mono/wasm/runtime/types.ts b/src/mono/wasm/runtime/types.ts index 3f1a0d51dde44..bd1066311ec81 100644 --- a/src/mono/wasm/runtime/types.ts +++ b/src/mono/wasm/runtime/types.ts @@ -231,7 +231,7 @@ export type RuntimeHelpers = { loadedFiles: string[], preferredIcuAsset: string | null, timezone: string | null, - updateGlobalBufferAndViews: (buffer: ArrayBufferLike) => void + updateMemoryViews: () => void } export type GlobalizationMode = From 84dbae98b7bef0f114c519be2f9da6118da1215f Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 8 Mar 2023 23:07:25 +0100 Subject: [PATCH 35/46] Pass --experimental-wasm-bigint to v8 Ubuntu 18.04 helix image has old v8 --- eng/testing/WasmRunnerTemplate.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eng/testing/WasmRunnerTemplate.sh b/eng/testing/WasmRunnerTemplate.sh index 077f891d05105..e1db27a320996 100644 --- a/eng/testing/WasmRunnerTemplate.sh +++ b/eng/testing/WasmRunnerTemplate.sh @@ -45,7 +45,11 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then fi if [[ -z "$JS_ENGINE_ARGS" ]]; then - JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000" + if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then + JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000" + else + JS_ENGINE_ARGS="--engine-arg=\"--stack-trace-limit=1000 --experimental-wasm-bigint\"" + fi fi fi From b94be3d02ce565602134ae97312127e30618b816 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 9 Mar 2023 09:18:04 +0100 Subject: [PATCH 36/46] Try multiple --engine-arg options --- eng/testing/WasmRunnerTemplate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/testing/WasmRunnerTemplate.sh b/eng/testing/WasmRunnerTemplate.sh index e1db27a320996..2238017833920 100644 --- a/eng/testing/WasmRunnerTemplate.sh +++ b/eng/testing/WasmRunnerTemplate.sh @@ -48,7 +48,7 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000" else - JS_ENGINE_ARGS="--engine-arg=\"--stack-trace-limit=1000 --experimental-wasm-bigint\"" + JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000 --engine-arg=--experimental-wasm-bigint" fi fi fi From b5516264f4d6cdcbeb0957eca0c3e2d2aa8352f6 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 9 Mar 2023 13:22:41 +0100 Subject: [PATCH 37/46] Revert "Introduce EmccStackSize msbuild property" This reverts commit f67ea5e303421bb89f5521f425f22a82aa5d6f46. --- src/mono/wasm/build/WasmApp.Native.targets | 3 +-- src/mono/wasm/build/WasmApp.targets | 4 +--- src/mono/wasm/wasm.proj | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index ffe1cfc7e150e..82cd51565d706 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -187,7 +187,6 @@ <_EmccLinkRsp>$(_WasmIntermediateOutputPath)emcc-link.rsp $(EmccTotalMemory) - 5MB false @@ -422,7 +421,7 @@ <_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> - <_EmccLDSFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> + <_EmccLDSFlags Include="-s STACK_SIZE=5MB" /> <_EmccLDSFlags Include="-s WASM_BIGINT=1" /> <_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" /> diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index df0858f237e10..6cf8f68324760 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -50,10 +50,8 @@ - $(EmccExtraLDFlags) - Extra emcc flags for linking - $(EmccExtraCFlags) - Extra emcc flags for compiling native files - $(EmccInitialHeapSize) - Initial heap size specified with `emcc`. Default value: 16777216 or size of the DLLs, whichever is larger. - Corresponds to `-s INITIAL_MEMORY=...` emcc arg. + Corresponds to `INITIAL_MEMORY` arg for emcc. (previously named EmccTotalMemory, which is still kept as an alias) - - $(EmccStackSize) - Stack size. Default value: 5MB. - Corresponds to `-s STACK_SIZE=...` emcc arg. - $(WasmBuildAppAfterThisTarget) - This target is used as `AfterTargets` for `WasmBuildApp. this is what triggers the wasm app building. Defaults to `Build`. diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index d1cfdbcd51fac..cd54b81bb2443 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -228,11 +228,10 @@ <_EmccExportedRuntimeMethods>"[@(EmccExportedRuntimeMethod -> '%27%(Identity)%27', ',')]" <_EmccExportedFunctions>@(EmccExportedFunction -> '%(Identity)',',') 16777216 - 5MB <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> - <_EmccLinkFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> + <_EmccLinkFlags Include="-s STACK_SIZE=5MB" /> <_EmccCommonFlags Condition="'$(WasmEnableSIMD)' == 'true'" Include="-msimd128" /> <_EmccCommonFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> <_EmccLinkFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-Wno-pthreads-mem-growth" /> From 4c458010c46474ff50053b586c74d4865c5c7765 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 9 Mar 2023 13:39:09 +0100 Subject: [PATCH 38/46] Disable 3 filesystem related tests --- src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs | 1 + .../tests/MemoryMappedFile.CreateFromFile.Tests.cs | 1 + .../tests/MemoryMappedViewAccessor.Tests.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs b/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs index e622c7d22010d..3b5a915f76de3 100644 --- a/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs +++ b/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs @@ -138,6 +138,7 @@ public override IEnumerable TimeFunctions(bool requiresRoundtrippi } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)] public void SetLastWriteTimeTicks() { string firstFile = GetTestFilePath(); diff --git a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs index 4e06fb078c8ef..8877936ed1287 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs @@ -737,6 +737,7 @@ public void LeaveOpenRespected_Basic(bool leaveOpen) [Theory] [InlineData(true)] [InlineData(false)] + [ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)] public void LeaveOpenRespected_OutstandingViews(bool leaveOpen) { const int Capacity = 4096; diff --git a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs index 8fe35396ae804..6747758c7b533 100644 --- a/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs +++ b/src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs @@ -475,6 +475,7 @@ public void InvalidAfterDisposal() /// Test to verify that we can still use a view after the associated map has been disposed. /// [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)] public void UseAfterMMFDisposal() { foreach (MemoryMappedFile mmf in CreateSampleMaps(8192)) From c5f073f92ea5079a0186e5868da475b4c1ab7aca Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 9 Mar 2023 13:44:48 +0100 Subject: [PATCH 39/46] Add bigint to AOT test template --- eng/testing/WasmRunnerAOTTemplate.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eng/testing/WasmRunnerAOTTemplate.sh b/eng/testing/WasmRunnerAOTTemplate.sh index b012eafabdef4..68a94e8e4d579 100644 --- a/eng/testing/WasmRunnerAOTTemplate.sh +++ b/eng/testing/WasmRunnerAOTTemplate.sh @@ -32,23 +32,23 @@ if [[ -z "$XHARNESS_COMMAND" ]]; then fi if [[ "$XHARNESS_COMMAND" == "test" ]]; then + if [[ -z "$JS_ENGINE_ARGS" ]]; then + JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000" + fi + if [[ -z "$JS_ENGINE" ]]; then if [[ "$SCENARIO" == "WasmTestOnNodeJS" || "$SCENARIO" == "wasmtestonnodejs" ]]; then JS_ENGINE="--engine=NodeJS" JS_ENGINE_ARGS="$JS_ENGINE_ARGS --engine-arg=--experimental-wasm-simd" else JS_ENGINE="--engine=V8" - JS_ENGINE_ARGS="$JS_ENGINE_ARGS --engine-arg=--experimental-wasm-simd" + JS_ENGINE_ARGS="$JS_ENGINE_ARGS --engine-arg=--experimental-wasm-simd --engine-arg=--experimental-wasm-bigint" fi fi if [[ -z "$MAIN_JS" ]]; then MAIN_JS="--js-file=test-main.js" fi - - if [[ -z "$JS_ENGINE_ARGS" ]]; then - JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000" - fi fi if [[ -z "$XHARNESS_ARGS" ]]; then From b2a99a8100b1bfa3c1d4852f110c0b25e77b9636 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Wed, 8 Mar 2023 17:32:20 +0100 Subject: [PATCH 40/46] Introduce EmccStackSize msbuild property --- src/mono/wasm/build/WasmApp.Native.targets | 3 ++- src/mono/wasm/build/WasmApp.targets | 4 +++- src/mono/wasm/wasm.proj | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index 82cd51565d706..ffe1cfc7e150e 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -187,6 +187,7 @@ <_EmccLinkRsp>$(_WasmIntermediateOutputPath)emcc-link.rsp $(EmccTotalMemory) + 5MB false @@ -421,7 +422,7 @@ <_EmccLDSFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> - <_EmccLDSFlags Include="-s STACK_SIZE=5MB" /> + <_EmccLDSFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> <_EmccLDSFlags Include="-s WASM_BIGINT=1" /> <_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" /> diff --git a/src/mono/wasm/build/WasmApp.targets b/src/mono/wasm/build/WasmApp.targets index 6cf8f68324760..df0858f237e10 100644 --- a/src/mono/wasm/build/WasmApp.targets +++ b/src/mono/wasm/build/WasmApp.targets @@ -50,8 +50,10 @@ - $(EmccExtraLDFlags) - Extra emcc flags for linking - $(EmccExtraCFlags) - Extra emcc flags for compiling native files - $(EmccInitialHeapSize) - Initial heap size specified with `emcc`. Default value: 16777216 or size of the DLLs, whichever is larger. - Corresponds to `INITIAL_MEMORY` arg for emcc. + Corresponds to `-s INITIAL_MEMORY=...` emcc arg. (previously named EmccTotalMemory, which is still kept as an alias) + - $(EmccStackSize) - Stack size. Default value: 5MB. + Corresponds to `-s STACK_SIZE=...` emcc arg. - $(WasmBuildAppAfterThisTarget) - This target is used as `AfterTargets` for `WasmBuildApp. this is what triggers the wasm app building. Defaults to `Build`. diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index cd54b81bb2443..d1cfdbcd51fac 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -228,10 +228,11 @@ <_EmccExportedRuntimeMethods>"[@(EmccExportedRuntimeMethod -> '%27%(Identity)%27', ',')]" <_EmccExportedFunctions>@(EmccExportedFunction -> '%(Identity)',',') 16777216 + 5MB <_EmccLinkFlags Include="-s INITIAL_MEMORY=$(EmccInitialHeapSize)" /> - <_EmccLinkFlags Include="-s STACK_SIZE=5MB" /> + <_EmccLinkFlags Include="-s STACK_SIZE=$(EmccStackSize)" /> <_EmccCommonFlags Condition="'$(WasmEnableSIMD)' == 'true'" Include="-msimd128" /> <_EmccCommonFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-s USE_PTHREADS=1" /> <_EmccLinkFlags Condition="'$(MonoWasmThreads)' == 'true'" Include="-Wno-pthreads-mem-growth" /> From fda96f711717e5211473779e6ebe32fbed4fadad Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 9 Mar 2023 17:59:45 +0100 Subject: [PATCH 41/46] Update emsdk deps --- eng/Version.Details.xml | 12 ++++++------ eng/Versions.props | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 972c24bd74de9..4691bd765b82b 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -85,18 +85,18 @@ b126490cd618d6066ed44e0369b4585e845cf9ab - + https://github.com/dotnet/emsdk - 9caae336ae0eade717689fa3b75f23de226811f4 + 2552272b2e678e92cff067653709f93ab52f5f39 - + https://github.com/dotnet/emsdk - 9caae336ae0eade717689fa3b75f23de226811f4 + 2552272b2e678e92cff067653709f93ab52f5f39 - + https://github.com/dotnet/emsdk - 9caae336ae0eade717689fa3b75f23de226811f4 + 2552272b2e678e92cff067653709f93ab52f5f39 diff --git a/eng/Versions.props b/eng/Versions.props index 56cd843c7a2d9..61f8bd1e5546b 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -238,9 +238,9 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100-preview_2 --> - 8.0.0-preview.3.23128.1 - 8.0.0-preview.3.23128.1 - 8.0.0-preview.3.23128.1 + 8.0.0-preview.3.23159.1 + 8.0.0-preview.3.23159.1 + 8.0.0-preview.3.23159.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview3Version) 1.1.87-gba258badda From 55fddbfcd9cd6492928f5bc4b6392d8eada39094 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 9 Mar 2023 18:28:38 +0100 Subject: [PATCH 42/46] Update icu deps --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 4691bd765b82b..0ef3ddf440062 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/icu - e661b4344e89185d1fc97387042af58bd04f6ebe + 07147a4624c87aae2f46075e470f45aedbb70336 https://github.com/dotnet/msquic diff --git a/eng/Versions.props b/eng/Versions.props index 61f8bd1e5546b..64e19ba263f56 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -219,7 +219,7 @@ 0.11.4-alpha.23156.1 - 8.0.0-preview.3.23128.1 + 8.0.0-preview.3.23159.1 2.1.7 8.0.0-alpha.1.23156.1 From 0da18d5ed1258cbfd4abb4fa0fee51426577e771 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Thu, 9 Mar 2023 22:58:44 +0100 Subject: [PATCH 43/46] Revert "Add `-s INCOMING_MODULE_JS_API=print,printErr`" This reverts commit 889d0366e4438880029c85ac800d4403f713dfff. --- src/mono/wasm/build/WasmApp.Native.targets | 1 - src/mono/wasm/wasm.proj | 1 - 2 files changed, 2 deletions(-) diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets index ffe1cfc7e150e..d0837e1ec5569 100644 --- a/src/mono/wasm/build/WasmApp.Native.targets +++ b/src/mono/wasm/build/WasmApp.Native.targets @@ -451,7 +451,6 @@ <_EmccLinkStepArgs Include="-s EXPORTED_RUNTIME_METHODS=$(_EmccExportedRuntimeMethods)" /> <_EmccLinkStepArgs Include="-s EXPORTED_FUNCTIONS=$(_EmccExportedFunctions)" /> - <_EmccLinkStepArgs Include="-s INCOMING_MODULE_JS_API=print,printErr" /> <_EmccLinkStepArgs Include="$(EmccExtraLDFlags)" /> diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj index d1cfdbcd51fac..120c9c591ee0a 100644 --- a/src/mono/wasm/wasm.proj +++ b/src/mono/wasm/wasm.proj @@ -245,7 +245,6 @@ <_EmccLinkFlags Include="-s FORCE_FILESYSTEM=1" /> <_EmccLinkFlags Include="-s EXPORTED_RUNTIME_METHODS=$(_EmccExportedRuntimeMethods)" /> <_EmccLinkFlags Include="-s EXPORTED_FUNCTIONS=$(_EmccExportedFunctions)" /> - <_EmccLinkFlags Include="-s INCOMING_MODULE_JS_API=print,printErr" /> <_EmccLinkFlags Include="--source-map-base http://example.com" /> <_EmccLinkFlags Include="-s STRICT_JS=1" /> <_EmccLinkFlags Include="-s WASM_BIGINT=1" /> From 6420bf6cbd265439639f0bf406ae74911057c53c Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 10 Mar 2023 18:25:46 +0100 Subject: [PATCH 44/46] Update emsdk deps --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index b01222d4e5c4b..ede5f59348515 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -85,9 +85,9 @@ b126490cd618d6066ed44e0369b4585e845cf9ab - + https://github.com/dotnet/emsdk - b211c38c398416b516ffab1806b8ba47d49c42da + 352d64e0ce9b99a8cff6207621432a986920ffd9 diff --git a/eng/Versions.props b/eng/Versions.props index 9f6467b4dcf06..7c1c5bd96d920 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -238,7 +238,7 @@ Note: when the name is updated, make sure to update dependency name in eng/pipelines/common/xplat-setup.yml like - DarcDependenciesChanged.Microsoft_NET_Workload_Emscripten_Current_Manifest-8_0_100-preview_2 --> - 8.0.0-preview.3.23159.3 + 8.0.0-preview.3.23160.1 $(MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion) 1.1.87-gba258badda From 58b5c1ddff2d3242f4714d9e2392d1ea044cd281 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 10 Mar 2023 18:29:14 +0100 Subject: [PATCH 45/46] Update icu deps --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index ede5f59348515..4d1df17a8279d 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,8 +1,8 @@ - + https://github.com/dotnet/icu - 07147a4624c87aae2f46075e470f45aedbb70336 + ce62ebe8dbfec7cdf79421d32b2c8eac439ad78c https://github.com/dotnet/msquic diff --git a/eng/Versions.props b/eng/Versions.props index 7c1c5bd96d920..5926f59958add 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -219,7 +219,7 @@ 0.11.4-alpha.23156.1 - 8.0.0-preview.3.23159.1 + 8.0.0-preview.3.23160.1 2.1.7 8.0.0-alpha.1.23156.1 From 2a446e111d318db57963f4b70d5e2faecf14aae7 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Fri, 10 Mar 2023 20:24:57 +0100 Subject: [PATCH 46/46] Disable one more file related test --- src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs b/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs index 3b5a915f76de3..2eaa67a24f972 100644 --- a/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs +++ b/src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs @@ -185,6 +185,7 @@ public void SetDateTimeMax() } [Fact] + [ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)] public void SetLastAccessTimeTicks() { string firstFile = GetTestFilePath();