Skip to content
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
10 changes: 5 additions & 5 deletions eng/native/configureplatform.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ else()
if(CLR_CMAKE_RUNTIME_CORECLR)
if(CLR_CMAKE_TARGET_BROWSER AND NOT CLR_CROSS_COMPONENTS_BUILD)
add_link_options(-fwasm-exceptions)
add_link_options(-sWASM_LEGACY_EXCEPTIONS=1)
add_link_options(-sWASM_LEGACY_EXCEPTIONS=0)
add_link_options(-Wno-unused-command-line-argument)
add_link_options(-Wl,--error-limit=0)

Expand All @@ -512,12 +512,12 @@ else()
add_link_options(-lc)
add_link_options(-lmalloc)
add_link_options(-lcompiler_rt)
add_link_options(-lc++)
add_link_options(-lc++abi)
add_link_options(-lunwind)
add_link_options(-lc++-wasmexcept)
add_link_options(-lc++abi-wasmexcept)
add_link_options(-lunwind-wasmexcept)

add_compile_options(-fwasm-exceptions)
add_compile_options(-sWASM_LEGACY_EXCEPTIONS=1)
add_compile_options(-sWASM_LEGACY_EXCEPTIONS=0)
add_compile_options(-mbulk-memory)
add_compile_options(-msimd128)
endif()
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/templates/pipeline-with-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ extends:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream-10-amd64@sha256:1849c00a1347f17dbdd167bc8d025b9e2c31273a1f8c2eddbfac3f2197932ee7

browser_wasm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net11.0-webassembly-amd64@sha256:5ad583f9a503d9b5d71171ac27018db895f9b48f136d5d4fe3cdcf80bc28937e
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net11.0-webassembly-amd64@sha256:0afc4daa90da131fd61de0751429a7dadf4cc2e4a159f0c60a0d24d02267bae8
env:
ROOTFS_DIR: /crossrootfs/x64

wasi_wasm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net11.0-webassembly-amd64@sha256:5ad583f9a503d9b5d71171ac27018db895f9b48f136d5d4fe3cdcf80bc28937e
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net11.0-webassembly-amd64@sha256:0afc4daa90da131fd61de0751429a7dadf4cc2e4a159f0c60a0d24d02267bae8
env:
ROOTFS_DIR: /crossrootfs/x64

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ parameters:
dependsOn: []
extraHelixArguments: ''
buildAllTestsAsStandalone: false
sendToHelix: true
#arcade-specific parameters
condition: always()
continueOnError: false
Expand Down Expand Up @@ -82,41 +83,48 @@ steps:
env:
__MonoToolPrefix: aarch64-linux-gnu-

- template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml
parameters:
displayName: Send tests to Helix
buildConfig: $(buildConfigUpper)
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup}}
coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
runtimeFlavor: ${{ parameters.runtimeFlavor }}
runtimeVariant: ${{ parameters.runtimeVariant }}
# Build the runtime tests above, but only send them to Helix when sendToHelix is true.
# This is a compile-time exclusion (not a runtime condition): send-to-helix-inner-step.yml
# wraps the passed-in condition into a string and compares it with ne(condition, false), so a
# runtime 'condition: false' is swallowed and the send runs anyway. Excluding the template keeps
# build coverage while reliably skipping execution on engines that can't run the tests yet
# (e.g. browser/V8 without exnref support).
- ${{ if eq(parameters.sendToHelix, true) }}:
- template: /eng/pipelines/common/templates/runtimes/send-to-helix-step.yml
parameters:
displayName: Send tests to Helix
buildConfig: $(buildConfigUpper)
archType: ${{ parameters.archType }}
osGroup: ${{ parameters.osGroup }}
osSubgroup: ${{ parameters.osSubgroup}}
coreClrRepoRoot: $(Build.SourcesDirectory)/src/coreclr
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
runtimeFlavor: ${{ parameters.runtimeFlavor }}
runtimeVariant: ${{ parameters.runtimeVariant }}

${{ if eq(variables['System.TeamProject'], 'internal') }}:
# Access token variable for internal project from the
# DotNet-HelixApi-Access variable group
helixAccessToken: $(HelixApiAccessToken)
${{ else }}:
creator: $(Build.DefinitionName)
${{ if eq(variables['System.TeamProject'], 'internal') }}:
# Access token variable for internal project from the
# DotNet-HelixApi-Access variable group
helixAccessToken: $(HelixApiAccessToken)
${{ else }}:
creator: $(Build.DefinitionName)

helixBuild: $(Build.BuildNumber)
helixSource: $(_HelixSource)
${{ if ne(parameters.readyToRun, true) }}:
helixType: 'test/functional/cli/'
helixBuild: $(Build.BuildNumber)
helixSource: $(_HelixSource)
${{ if ne(parameters.readyToRun, true) }}:
helixType: 'test/functional/cli/'

helixQueues: ${{ parameters.helixQueues }}
# This tests whether an array is empty
${{ if eq(join('', parameters.helixQueues), '') }}:
condition: false
publishTestResults: true
timeoutPerTestInMinutes: $(timeoutPerTestInMinutes)
timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes)
runCrossGen2: ${{ eq(parameters.readyToRun, true) }}
compositeBuildMode: ${{ parameters.compositeBuildMode }}
runInUnloadableContext: ${{ parameters.runInUnloadableContext }}
nativeAotTest: ${{ parameters.nativeAotTest }}
helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj'
extraHelixArguments: ${{ parameters.extraHelixArguments }}
scenarios: ${{ parameters.scenarios }}
helixQueues: ${{ parameters.helixQueues }}
# This tests whether an array is empty
${{ if eq(join('', parameters.helixQueues), '') }}:
condition: false
publishTestResults: true
timeoutPerTestInMinutes: $(timeoutPerTestInMinutes)
timeoutPerTestCollectionInMinutes: $(timeoutPerTestCollectionInMinutes)
runCrossGen2: ${{ eq(parameters.readyToRun, true) }}
compositeBuildMode: ${{ parameters.compositeBuildMode }}
runInUnloadableContext: ${{ parameters.runInUnloadableContext }}
nativeAotTest: ${{ parameters.nativeAotTest }}
helixProjectArguments: '$(Build.SourcesDirectory)/src/tests/Common/helixpublishwitharcade.proj'
extraHelixArguments: ${{ parameters.extraHelixArguments }}
scenarios: ${{ parameters.scenarios }}
5 changes: 5 additions & 0 deletions eng/pipelines/common/templates/wasm-runtime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,10 @@ jobs:
creator: dotnet-bot
testRunNamePrefixSuffix: Mono_$(_BuildConfig)
testBuildArgs: /p:InstallV8ForTests=false
# Build the runtime tests for browser, but don't send them to Helix to run on V8: the
# V8 baked into the helix-webassembly container doesn't support --experimental-wasm-exnref
# yet, so the tests abort at startup. Re-enable the run once the new V8 image is
# available. See ActiveIssue https://github.com/dotnet/runtime/issues/129849
sendToHelix: false
extraVariablesTemplates:
- template: /eng/pipelines/common/templates/runtimes/test-variables.yml
14 changes: 5 additions & 9 deletions eng/pipelines/performance/runtime-wasm-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@

trigger: none

pr:
branches:
include:
- main
paths:
include:
- eng/pipelines/performance/*
- eng/testing/performance/*
- eng/testing/BrowserVersions.props
# Disabled: the perf wasm v8 job installs V8 via jsvu, and the V8 binary it currently
# installs does not support --experimental-wasm-exnref yet, so the MicroBenchmarks Helix
# job aborts at startup. Re-enable once an exnref-capable V8 is pinned. See
# ActiveIssue https://github.com/dotnet/runtime/issues/129849
pr: none

resources:
repositories:
Expand Down
8 changes: 7 additions & 1 deletion eng/pipelines/runtime-linker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,11 @@ extends:
postBuildSteps:
- template: /eng/pipelines/libraries/execute-trimming-tests-steps.yml
parameters:
extraTestArgs: '/p:WasmBuildNative=false /p:RuntimeFlavor=Mono /p:ToolsConfiguration=Debug'
# Publish the trimmed browser apps, but don't run them on V8: the V8 baked into
# the helix-webassembly container doesn't support --experimental-wasm-exnref yet,
# so run-v8.sh aborts at startup. SkipTrimmingTestsRun keeps the build/publish
# coverage and only skips ExecuteApplications. Re-enable the run once the new V8
# image is available. See
# ActiveIssue https://github.com/dotnet/runtime/issues/129849
extraTestArgs: '/p:WasmBuildNative=false /p:RuntimeFlavor=Mono /p:ToolsConfiguration=Debug /p:SkipTrimmingTestsRun=true'
runAotTests: false
1 change: 1 addition & 0 deletions eng/pipelines/runtime-llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pr:
- src/mono/mono/mini/mini-exceptions.*
- src/mono/mono/mini/exceptions-*.*
- src/mono/mono/mini/mini-runtime.*
- src/mono/mono/metadata/assembly-load-context.*

variables:
- template: /eng/pipelines/common/variables.yml
Expand Down
3 changes: 2 additions & 1 deletion eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,8 @@ extends:
extraBuildArgs: /p:AotHostArchitecture=x64 /p:AotHostOS=$(_hostedOS)
scenarios:
- WasmTestOnFirefox
- WasmTestOnV8
# ActiveIssue https://github.com/dotnet/runtime/issues/129849
# - WasmTestOnV8

# EAT Library tests - only run on linux
- template: /eng/pipelines/common/templates/wasm-library-aot-tests.yml
Expand Down
6 changes: 3 additions & 3 deletions eng/testing/BrowserVersions.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<linux_ChromeVersion>149.0.7827.53</linux_ChromeVersion>
<linux_ChromeRevision>1625079</linux_ChromeRevision>
<linux_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/1625084</linux_ChromeBaseSnapshotUrl>
<linux_V8Version>14.9.207</linux_V8Version>
<linux_V8Version>15.1.103</linux_V8Version>
<macos_ChromeVersion>143.0.7499.40</macos_ChromeVersion>
<macos_ChromeRevision>1536371</macos_ChromeRevision>
<macos_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Mac_Arm/1536376</macos_ChromeBaseSnapshotUrl>
<macos_V8Version>14.3.127</macos_V8Version>
<macos_V8Version>15.1.103</macos_V8Version>
<win_ChromeVersion>150.0.7871.24</win_ChromeVersion>
<win_ChromeRevision>1639810</win_ChromeRevision>
<win_ChromeBaseSnapshotUrl>https://storage.googleapis.com/chromium-browser-snapshots/Win_x64/1639827</win_ChromeBaseSnapshotUrl>
<win_V8Version>15.0.245</win_V8Version>
<win_V8Version>15.1.103</win_V8Version>
<linux_FirefoxRevision>140.11.0esr</linux_FirefoxRevision>
<linux_GeckoDriverRevision>0.37.0</linux_GeckoDriverRevision>
<win_FirefoxRevision>140.11.0esr</win_FirefoxRevision>
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/WasmRunnerTemplate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if /I [%XHARNESS_COMMAND%] == [test] (
)

if [%JS_ENGINE_ARGS%] == [] (
set "JS_ENGINE_ARGS=--engine-arg^=--stack-trace-limit^=1000"
set "JS_ENGINE_ARGS=--engine-arg^=--stack-trace-limit^=1000 --engine-arg^=--experimental-wasm-exnref"
)
) else (
if /I [%SCENARIO%] == [WasmTestOnChrome] (
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/WasmRunnerTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [[ "$XHARNESS_COMMAND" == "test" ]]; then
fi

if [[ -z "$JS_ENGINE_ARGS" ]]; then
JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000"
JS_ENGINE_ARGS="--engine-arg=--stack-trace-limit=1000 --engine-arg=--experimental-wasm-exnref"
Comment thread
akoeplinger marked this conversation as resolved.
fi
else
if [[ "$SCENARIO" == "WasmTestOnChrome" || "$SCENARIO" == "wasmtestonchrome" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion eng/testing/linker/trimmingTests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
DependsOnTargets="PublishTrimmedProjects"
Inputs="%(TestConsoleApps.Identity)"
Outputs="_unused"
Condition="'$(ArchiveTests)' != 'true'">
Condition="'$(ArchiveTests)' != 'true' and '$(SkipTrimmingTestsRun)' != 'true'">

<Message Importance="High" Text="[Trimming Tests] Running test: %(TestConsoleApps.ProjectCompileItems) ..." />
<Exec IgnoreExitCode="true" Command="%(TestConsoleApps.TestCommand)" StandardOutputImportance="Low" WorkingDirectory="%(TestConsoleApps.TestExecutionDirectory)">
Expand Down
4 changes: 2 additions & 2 deletions src/mono/browser/browser.proj
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@

<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Debug'">-g -Os -DDEBUG=1</CMakeConfigurationEmccFlags>
<CMakeConfigurationEmccFlags Condition="'$(Configuration)' == 'Release'">-Oz</CMakeConfigurationEmccFlags>
<CMakeConfigurationEmccFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">$(CMakeConfigurationEmccFlags) -fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=1</CMakeConfigurationEmccFlags>
<CMakeConfigurationEmccFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">$(CMakeConfigurationEmccFlags) -fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0</CMakeConfigurationEmccFlags>
<CMakeConfigurationEmccFlags Condition="'$(WasmEnableExceptionHandling)' == 'false'">$(CMakeConfigurationEmccFlags) -fexceptions</CMakeConfigurationEmccFlags>

<CMakeConfigurationLinkFlags Condition="'$(Configuration)' == 'Debug'" >$(CMakeConfigurationEmccFlags) -s ASSERTIONS=1 </CMakeConfigurationLinkFlags>
Expand All @@ -335,7 +335,7 @@
<CMakeConfigurationLinkFlags Condition="'$(WasmEnableSIMD)' == 'true'">$(CMakeConfigurationLinkFlags) -msimd128</CMakeConfigurationLinkFlags>
<CMakeConfigurationLinkFlags Condition="'$(WasmEnableThreads)' == 'true'">$(CMakeConfigurationLinkFlags) -Wno-pthreads-mem-growth</CMakeConfigurationLinkFlags>
<CMakeConfigurationLinkFlags >$(CMakeConfigurationLinkFlags) --emit-symbol-map</CMakeConfigurationLinkFlags>
<CMakeConfigurationLinkFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">$(CMakeConfigurationLinkFlags) -fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=1</CMakeConfigurationLinkFlags>
<CMakeConfigurationLinkFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">$(CMakeConfigurationLinkFlags) -fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0</CMakeConfigurationLinkFlags>
<CMakeConfigurationLinkFlags Condition="'$(WasmEnableExceptionHandling)' == 'false'">$(CMakeConfigurationLinkFlags) -fexceptions</CMakeConfigurationLinkFlags>

<CMakeConfigurationEmsdkPath Condition="'$(Configuration)' == 'Release'"> -DEMSDK_PATH=&quot;$(EMSDK_PATH.TrimEnd('\/').Replace('\','/'))&quot;</CMakeConfigurationEmsdkPath>
Expand Down
3 changes: 2 additions & 1 deletion src/mono/browser/build/BrowserWasmApp.CoreCLR.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<WasmEnableSIMD>true</WasmEnableSIMD>
<WasmClang>emcc</WasmClang>

<_WasmDefaultFlags>-fwasm-exceptions -msimd128</_WasmDefaultFlags>
<_WasmDefaultFlags>-fwasm-exceptions -sWASM_LEGACY_EXCEPTIONS=0 -msimd128</_WasmDefaultFlags>

<WasmBuildAppAfterThisTarget Condition="'$(WasmBuildAppAfterThisTarget)' == ''">Build</WasmBuildAppAfterThisTarget>
<WasmTriggerPublishAppAfterThisTarget Condition="'$(WasmTriggerPublishAppAfterThisTarget)' == ''">Publish</WasmTriggerPublishAppAfterThisTarget>
Expand Down Expand Up @@ -465,6 +465,7 @@
<_EmccCommonFlags Include="-v" Condition="'$(EmccVerbose)' == 'true'" />
<_EmccCommonFlags Include="-g" Condition="'$(WasmNativeDebugSymbols)' == 'true'" />
<_EmccCommonFlags Include="-fwasm-exceptions" />
<_EmccCommonFlags Include="-sWASM_LEGACY_EXCEPTIONS=0" />
<_EmccCommonFlags Include="-msimd128" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions src/mono/browser/build/BrowserWasmApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<WasmClang>emcc</WasmClang>

<_WasmDefaultFlags Condition="'$(WasmEnableExceptionHandling)' == 'false'">-fexceptions</_WasmDefaultFlags>
<_WasmDefaultFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">-fwasm-exceptions -s WASM_LEGACY_EXCEPTIONS=1</_WasmDefaultFlags>
<_WasmDefaultFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'">-fwasm-exceptions -s WASM_LEGACY_EXCEPTIONS=0</_WasmDefaultFlags>
<_WasmDefaultFlags Condition="'$(WasmEnableSIMD)' == 'true'">$(_WasmDefaultFlags) -msimd128</_WasmDefaultFlags>

<_WasmOutputFileName Condition="'$(WasmSingleFileBundle)' != 'true'">dotnet.native.wasm</_WasmOutputFileName>
Expand Down Expand Up @@ -181,7 +181,7 @@
<_EmccCommonFlags Include="-fexceptions" Condition="'$(WasmEnableExceptionHandling)' == 'false'" />
<_EmccCommonFlags Include="-s DISABLE_EXCEPTION_CATCHING=0" Condition="'$(WasmEnableExceptionHandling)' == 'false'" />
<_EmccCommonFlags Include="-fwasm-exceptions" Condition="'$(WasmEnableExceptionHandling)' == 'true'" />
<_EmccCommonFlags Include="-s WASM_LEGACY_EXCEPTIONS=1" Condition="'$(WasmEnableExceptionHandling)' == 'true'" />
<_EmccCommonFlags Include="-s WASM_LEGACY_EXCEPTIONS=0" Condition="'$(WasmEnableExceptionHandling)' == 'true'" />
<_EmccCommonFlags Include="-s MAXIMUM_MEMORY=$(EmccMaximumHeapSize)" Condition="'$(EmccMaximumHeapSize)' != ''" />

<_EmccIncludePaths Include="$(_WasmIntermediateOutputPath.TrimEnd('\/'))" />
Expand Down Expand Up @@ -470,7 +470,7 @@

<WriteLinesToFile
File="$(WasmRunV8ScriptPath)"
Lines="$(V8ScriptShebang);v8 $(_WasmMainJSFileName) -- ${RUNTIME_ARGS} --run $(WasmMainAssemblyFileName) $*"
Lines="$(V8ScriptShebang);v8 --experimental-wasm-exnref $(_WasmMainJSFileName) -- ${RUNTIME_ARGS} --run $(WasmMainAssemblyFileName) $*"
Overwrite="true">
</WriteLinesToFile>

Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ set(ignoreMeEmsdkPath "${EMSDK_PATH}")

if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_custom_command(TARGET dotnet.native
POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling --enable-multivalue --enable-simd --enable-bulk-memory --enable-nontrapping-float-to-int ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm
POST_BUILD COMMAND ${EMSDK_PATH}/bin/wasm-opt --enable-exception-handling --enable-reference-types --enable-multivalue --enable-simd --enable-bulk-memory --enable-nontrapping-float-to-int ${CONFIGURATION_WASM_OPT_FLAGS} --strip-dwarf ${NATIVE_BIN_DIR}/dotnet.native.wasm -o ${NATIVE_BIN_DIR}/dotnet.native.wasm
Comment thread
pavelsavara marked this conversation as resolved.
COMMENT "Stripping debug symbols from dotnet.native.wasm using wasm-opt")
endif()

Expand Down
Loading
Loading