[wasm] Initial emscripten 3.1.30 support (#81215)
authorRadek Doulik <radek.doulik@gmail.com>
Sat, 11 Mar 2023 00:41:26 +0000 (01:41 +0100)
committerGitHub <noreply@github.com>
Sat, 11 Mar 2023 00:41:26 +0000 (18:41 -0600)
commitfe95ddbe92a298eab2e56ed10e7d6e92c9bb5f0a
tree804e1a5fcce1908905a000a98d108dcc9c7a5acf
parent8d9ca3fc2bfab3dabe283ced9e834cd58a90ce9b
[wasm] Initial emscripten 3.1.30 support (#81215)

* [wasm] Initial emscripten 3.1.30 support

* Update icu dependency

* Update emsdk dependency

* Use new docker images

* 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 .

* Drop build-time support for undefined icudt68_dat.

* Fix linker options

Should be `--lto-O0`

* Fix remaining conflict

* Limit new warnings option to browser

* Try to force reinstall of certifi

* Unset `FROZEN_CACHE` for `embuilder build MINIMAL`

* Update emsdk deps

* Remove assert for stack address

The linker puts stack at 0 sometime, so just check that the stack size
is not zero.

* Get back the stack base assert

For non-wasm targets. Add comment.

* 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.

* Disable WBT tests with SkiSharp

context: https://github.com/dotnet/runtime/issues/82725

* Disable more WBT tests with SkiSharp

* Set the stack size also in native targets

* Update icu deps

* Update emsdk deps

* Enable BigInt support

Co-authored-by: pavelsavara <pavel.savara@gmail.com>
* Enable BigInt here as well

* 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

* Try to use pip-system-certs package

Co-authored-by: Ankit Jain <radical@gmail.com>
* Fix merge damage for marking "icudt68_dat" a JS imported function + revert temporal fix.

* Try another python certifi package

* Try install pip-system-certs for emsdk's python

* Try to update machine certs for www.sqlite.org

* Refactor + upgrade pip

Also use the newer pip-system-certs again

* Use new net8 images

* Add `-s INCOMING_MODULE_JS_API=print,printErr`

* Introduce EmccStackSize msbuild property

* Remove FIXME from merge

We don't have afterUpdateGlobalBufferAndViews anymore

* Fixes around updateMemoryViews

* Pass --experimental-wasm-bigint to v8

Ubuntu 18.04 helix image has old v8

* Try multiple --engine-arg options

* Revert "Introduce EmccStackSize msbuild property"

This reverts commit f67ea5e303421bb89f5521f425f22a82aa5d6f46.

* Disable 3 filesystem related tests

* Add bigint to AOT test template

* Introduce EmccStackSize msbuild property

* Update emsdk deps

* Update icu deps

* Revert "Add `-s INCOMING_MODULE_JS_API=print,printErr`"

This reverts commit 889d0366e4438880029c85ac800d4403f713dfff.

* Update emsdk deps

* Update icu deps

* Disable one more file related test

---------

Co-authored-by: Marek FiĊĦera <mara@neptuo.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
Co-authored-by: Ankit Jain <radical@gmail.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
37 files changed:
eng/Version.Details.xml
eng/Versions.props
eng/pipelines/common/templates/pipeline-with-resources.yml
eng/pipelines/libraries/helix-queues-setup.yml
eng/pipelines/mono/update-machine-certs.ps1
eng/testing/WasmRunnerAOTTemplate.sh
eng/testing/WasmRunnerTemplate.sh
eng/testing/tests.browser.targets
src/libraries/System.IO.FileSystem/tests/File/GetSetTimes.cs
src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedFile.CreateFromFile.Tests.cs
src/libraries/System.IO.MemoryMappedFiles/tests/MemoryMappedViewAccessor.Tests.cs
src/mono/CMakeLists.txt
src/mono/mono.proj
src/mono/mono/utils/mono-threads.c
src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs
src/mono/wasm/Wasm.Build.Tests/Blazor/NativeRefTests.cs
src/mono/wasm/Wasm.Build.Tests/NativeLibraryTests.cs
src/mono/wasm/build/WasmApp.Native.targets
src/mono/wasm/build/WasmApp.targets
src/mono/wasm/emscripten-version.txt
src/mono/wasm/runtime/assets.ts
src/mono/wasm/runtime/dotnet.d.ts
src/mono/wasm/runtime/es6/dotnet.es6.lib.js
src/mono/wasm/runtime/exports-internal.ts
src/mono/wasm/runtime/exports.ts
src/mono/wasm/runtime/http.ts
src/mono/wasm/runtime/icu.ts
src/mono/wasm/runtime/invoke-cs.ts
src/mono/wasm/runtime/invoke-js.ts
src/mono/wasm/runtime/memory.ts
src/mono/wasm/runtime/polyfills.ts
src/mono/wasm/runtime/run.ts
src/mono/wasm/runtime/startup.ts
src/mono/wasm/runtime/types.ts
src/mono/wasm/runtime/types/emscripten.ts
src/mono/wasm/wasm.proj
src/native/libs/CMakeLists.txt