Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: Initialize threaded runtime properly in AotInterp mode #772

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 13 additions & 18 deletions .vsts-ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,19 @@ jobs:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"

### Threads AOT validation
#- bash: |
# cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
# dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
# dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true "/p:WasmShellWebAppBasePath=/"
# displayName: Build Threads AOT test
#
#- bash: |
# $(build.sourcesdirectory)/build/scripts/run-tests.sh \
# "$(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot/bin/Release/net6.0/dist" \
# "$(build.sourcesdirectory)/src/Uno.Wasm.Threading.UITests" "http://localhost:8000/"
# displayName: Threading AOT UI Tests
# env:
# BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
#
# Disabled for the following error: https://github.com/unoplatform/Uno.Wasm.Bootstrap/issues/724
# BROWSER LOG: Aborted(Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module,
# but after startup the value is only looked for on a local variable of that name))

- bash: |
cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true "/p:WasmShellWebAppBasePath=/"
displayName: Build Threads AOT test

- bash: |
$(build.sourcesdirectory)/build/scripts/run-tests.sh \
"$(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot/bin/Release/net6.0/dist" \
"$(build.sourcesdirectory)/src/Uno.Wasm.Threading.UITests" "http://localhost:8000/"
displayName: Threading AOT UI Tests
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"

## SWA sub-path validation
- bash: |
Expand Down
34 changes: 15 additions & 19 deletions .vsts-ci-windows-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,25 +238,21 @@ jobs:
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"

# # Thread AOT test
# - pwsh: |
# cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
# dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
# dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /bl:$(build.artifactstagingdirectory)/sample.threads-win.binlog
# displayName: Build Threading AOT Sample

# - pwsh: |
# $(build.sourcesdirectory)\build\scripts\run-tests-windows.ps1 `
# "$(build.sourcesdirectory)\src\Uno.Wasm.Threads.Aot\bin\Release\net6.0\dist" `
# "$(build.sourcesdirectory)\src\Uno.Wasm.Threading.UITests" `
# "http://localhost:8000/"
# displayName: Threading AOT Tests
# env:
# BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"
#
# Disabled for the following error: https://github.com/unoplatform/Uno.Wasm.Bootstrap/issues/724
# BROWSER LOG: Aborted(Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module,
# but after startup the value is only looked for on a local variable of that name))
# Thread AOT test
- pwsh: |
cd $(build.sourcesdirectory)/src/Uno.Wasm.Threads.Aot
dotnet clean -c Release /p:DISABLE_CLIHOST_NET6=true
dotnet publish -c Release /m:1 /p:DISABLE_CLIHOST_NET6=true /p:WasmShellEmccLinkOptimization=false /bl:$(build.artifactstagingdirectory)/sample.threads-win.binlog
displayName: Build Threading AOT Sample

- pwsh: |
$(build.sourcesdirectory)\build\scripts\run-tests-windows.ps1 `
"$(build.sourcesdirectory)\src\Uno.Wasm.Threads.Aot\bin\Release\net6.0\dist" `
"$(build.sourcesdirectory)\src\Uno.Wasm.Threading.UITests" `
"http://localhost:8000/"
displayName: Threading AOT Tests
env:
BUILD_SOURCESDIRECTORY: "$(build.sourcesdirectory)"

- task: PublishBuildArtifacts@1
condition: always()
Expand Down
2 changes: 0 additions & 2 deletions src/Uno.Wasm.Packager/packager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1195,11 +1195,9 @@ int Run (string[] args) {
if (enable_threads)
{
emcc_link_flags.Add("-s USE_PTHREADS=1");
emcc_link_flags.Add("-s PTHREAD_POOL_SIZE=2");
emcc_link_flags.Add("-Wno-pthreads-mem-growth");

emcc_flags += "-s USE_PTHREADS=1 ";
emcc_flags += "-s PTHREAD_POOL_SIZE=2 ";
emcc_flags += "-Wno-pthreads-mem-growth ";

aot_compiler_options += " --wasm-gc-safepoints ";
Expand Down