Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class BaseGetSetTimes<T> : FileSystemTest

protected static bool isHFS => driveFormat != null && driveFormat.Equals(HFS, StringComparison.InvariantCultureIgnoreCase);

protected static bool LowTemporalResolution => PlatformDetection.IsBrowser || isHFS;
protected static bool LowTemporalResolution => isHFS;
protected static bool HighTemporalResolution => !LowTemporalResolution;

protected abstract bool CanBeReadOnly { get; }
Expand Down Expand Up @@ -268,7 +268,7 @@ public void TimesIncludeMillisecondPart()
public void TimesIncludeMillisecondPart_LowTempRes()
{
T item = GetExistingItem();
// OSX HFS driver format and Browser do not support millisec granularity
// OSX HFS driver format does not support millisec granularity
Assert.All(TimeFunctions(), (function) =>
{
DateTime time = function.Getter(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public void CopyToMillisecondPresent()
}

[ConditionalFact(nameof(HighTemporalResolution))]
[ActiveIssue("https://github.com/dotnet/runtime/issues/83197", TestPlatforms.Browser)]
public void CopyToNanosecondsPresent()
{
FileInfo input = GetNonZeroNanoseconds();
Expand Down
15 changes: 11 additions & 4 deletions src/mono/browser/browser.proj
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,16 @@
<EmccExportedRuntimeMethod Include="runtimeKeepalivePop" />
<EmccExportedRuntimeMethod Include="maybeExit" />
<EmccExportedRuntimeMethod Include="abort" />
<EmccExportedRuntimeMethod Include="HEAP8" />
<EmccExportedRuntimeMethod Include="HEAP16" />
<EmccExportedRuntimeMethod Include="HEAPU8" />
<EmccExportedRuntimeMethod Include="HEAPU16" />
<EmccExportedRuntimeMethod Include="HEAP32" />
<EmccExportedRuntimeMethod Include="HEAPU32" />
<EmccExportedRuntimeMethod Include="HEAPF32" />
<EmccExportedRuntimeMethod Include="HEAPF64" />
<EmccExportedRuntimeMethod Include="HEAP64" />
<EmccExportedRuntimeMethod Include="HEAPU64" />

<EmccExportedFunction Include="_free" />
<EmccExportedFunction Include="_htons" />
Expand Down Expand Up @@ -229,10 +239,7 @@
</ItemGroup>

<ItemGroup Condition="'$(WasmEnableThreads)' == 'true'">
<WasmOptConfigurationFlags Include="--enable-threads;--enable-bulk-memory;--enable-sign-ext" />

<!-- workaround for https://github.com/emscripten-core/emscripten/issues/18034 -->
<_EmccLinkFlags Include="-s TEXTDECODER=0"/>
<WasmOptConfigurationFlags Include="--enable-threads;--enable-bulk-memory;--enable-nontrapping-float-to-int;--enable-sign-ext" />
</ItemGroup>

<ItemGroup Condition="'$(OS)' != 'Windows_NT'">
Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/build/EmSdkRepo.Defaults.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<EmscriptenUpstreamEmscriptenPath>$([MSBuild]::NormalizeDirectory($(EmscriptenSdkToolsPath), 'emscripten'))</EmscriptenUpstreamEmscriptenPath>

<!-- gets the path like emsdk/python/3.7.4-2_64bit -->
<EmscriptenNodeToolsPath Condition="'$(EmscriptenNodeToolsPath)' == ''">$([MSBuild]::NormalizeDirectory($(EmscriptenSdkToolsPath), 'node', 'bin'))</EmscriptenNodeToolsPath>
<EmscriptenNodeToolsPath Condition="'$(EmscriptenNodeToolsPath)' == ''">$([MSBuild]::NormalizeDirectory($(EmscriptenSdkToolsPath), 'node','22.16.0_64bit', 'bin'))</EmscriptenNodeToolsPath>

<_UsingEMSDK_PATH>true</_UsingEMSDK_PATH>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/mono/browser/emscripten-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.56
4.0.14
63 changes: 63 additions & 0 deletions src/mono/browser/env/emsdk_env.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@echo off

set CURRENT_SCRIPT=%~dp0
set EMSDK_PATH=%CURRENT_SCRIPT:~0,-1%\

set EMSDK_PYTHON=%EMSDK_PATH%python\python.exe
set DOTNET_EMSCRIPTEN_LLVM_ROOT=%EMSDK_PATH%bin\
set DOTNET_EMSCRIPTEN_NODE_JS=%EMSDK_PATH%node\22.16.0_64bit\bin\node.exe
set DOTNET_EMSCRIPTEN_BINARYEN_ROOT=%EMSDK_PATH%
@echo off
echo *** .NET EMSDK path setup ***
REM emscripten (emconfigure, em++, etc)
if "%EMSDK_PATH%"=="" (
echo %EMSDK_PATH% is empty
exit /b 1
)
set "TOADD_PATH_EMSCRIPTEN=%EMSDK_PATH%emscripten"
echo Prepending to PATH: %TOADD_PATH_EMSCRIPTEN%
set "PATH=%TOADD_PATH_EMSCRIPTEN%;%PATH%"
REM python
if "%EMSDK_PYTHON%"=="" (
echo %EMSDK_PYTHON% is empty
exit /b 1
)
for %%i in ("%EMSDK_PYTHON%") do set "TOADD_PATH_PYTHON=%%~dpi"
echo Prepending to PATH: %TOADD_PATH_PYTHON%
set "PATH=%TOADD_PATH_PYTHON%;%PATH%"
REM llvm (clang, etc)
if "%DOTNET_EMSCRIPTEN_LLVM_ROOT%"=="" (
echo %DOTNET_EMSCRIPTEN_LLVM_ROOT% is empty
exit /b 1
)
set "TOADD_PATH_LLVM=%DOTNET_EMSCRIPTEN_LLVM_ROOT%"
if not "%TOADD_PATH_EMSCRIPTEN%"=="%TOADD_PATH_LLVM%" (
echo Prepending to PATH: %TOADD_PATH_LLVM%
set "PATH=%TOADD_PATH_LLVM%;%PATH%"
)
REM nodejs (node)
if "%DOTNET_EMSCRIPTEN_NODE_JS%"=="" (
echo %DOTNET_EMSCRIPTEN_NODE_JS% is empty
exit /b 1
)
for %%i in ("%DOTNET_EMSCRIPTEN_NODE_JS%") do set "TOADD_PATH_NODEJS=%%~dpi"
if not "%TOADD_PATH_EMSCRIPTEN%"=="%TOADD_PATH_NODEJS%" (
if not "%TOADD_PATH_LLVM%"=="%TOADD_PATH_NODEJS%" (
echo Prepending to PATH: %TOADD_PATH_NODEJS%
set "PATH=%TOADD_PATH_NODEJS%;%PATH%"
)
)
REM binaryen (wasm-opt, etc)
if "%DOTNET_EMSCRIPTEN_BINARYEN_ROOT%"=="" (
echo %DOTNET_EMSCRIPTEN_BINARYEN_ROOT% is empty
exit /b 1
)
set "TOADD_PATH_BINARYEN=%DOTNET_EMSCRIPTEN_BINARYEN_ROOT%bin\"
if not "%TOADD_PATH_EMSCRIPTEN%"=="%TOADD_PATH_BINARYEN%" (
if not "%TOADD_PATH_LLVM%"=="%TOADD_PATH_BINARYEN%" (
if not "%TOADD_PATH_NODEJS%"=="%TOADD_PATH_BINARYEN%" (
echo Prepending to PATH: %TOADD_PATH_BINARYEN%
set "PATH=%TOADD_PATH_BINARYEN%;%PATH%"
)
)
)
44 changes: 44 additions & 0 deletions src/mono/browser/env/emsdk_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
echo "*** .NET EMSDK path setup ***"

# emscripten (emconfigure, em++, etc)
if [ -z "${EMSDK_PATH}" ]; then
echo "\$EMSDK_PATH is empty"
exit 1
fi
TOADD_PATH_EMSCRIPTEN="$(realpath ${EMSDK_PATH}/emscripten)"
echo "Prepending to PATH: ${TOADD_PATH_EMSCRIPTEN}"
export PATH=${TOADD_PATH_EMSCRIPTEN}:$PATH

# llvm (clang, etc)
if [ -z "${DOTNET_EMSCRIPTEN_LLVM_ROOT}" ]; then
echo "\$DOTNET_EMSCRIPTEN_LLVM_ROOT is empty"
exit 1
fi
TOADD_PATH_LLVM="$(realpath ${DOTNET_EMSCRIPTEN_LLVM_ROOT})"
if [ "${TOADD_PATH_EMSCRIPTEN}" != "${TOADD_PATH_LLVM}" ]; then
echo "Prepending to PATH: ${TOADD_PATH_LLVM}"
export PATH=${TOADD_PATH_LLVM}:$PATH
fi

# nodejs (node)
if [ -z "${DOTNET_EMSCRIPTEN_NODE_JS}" ]; then
echo "\$DOTNET_EMSCRIPTEN_NODE_JS is empty"
exit 1
fi
TOADD_PATH_NODEJS="$(dirname ${DOTNET_EMSCRIPTEN_NODE_JS})"
if [ "${TOADD_PATH_EMSCRIPTEN}" != "${TOADD_PATH_NODEJS}" ] && [ "${TOADD_PATH_LLVM}" != "${TOADD_PATH_NODEJS}" ]; then
echo "Prepending to PATH: ${TOADD_PATH_NODEJS}"
export PATH=${TOADD_PATH_NODEJS}:$PATH
fi

# binaryen (wasm-opt, etc)
if [ -z "${DOTNET_EMSCRIPTEN_BINARYEN_ROOT}" ]; then
echo "\$DOTNET_EMSCRIPTEN_BINARYEN_ROOT is empty"
exit 1
fi
TOADD_PATH_BINARYEN="$(realpath ${DOTNET_EMSCRIPTEN_BINARYEN_ROOT}/bin)"
if [ "${TOADD_PATH_EMSCRIPTEN}" != "${TOADD_PATH_BINARYEN}" ] && [ "${TOADD_PATH_LLVM}" != "${TOADD_PATH_BINARYEN}" ] && [ "${TOADD_PATH_NODEJS}" != "${TOADD_PATH_BINARYEN}" ]; then
echo "Prepending to PATH: ${TOADD_PATH_BINARYEN}"
export PATH=${TOADD_PATH_BINARYEN}:$PATH
fi
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-simd --enable-bulk-memory ${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-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 "Stripping debug symbols from dotnet.native.wasm using wasm-opt")
endif()

Expand Down
58 changes: 32 additions & 26 deletions src/mono/mono.proj
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export EMSDK_PATH=%24{DIR}/
unset DIR

export DOTNET_EMSCRIPTEN_LLVM_ROOT=%24{EMSDK_PATH}bin/
export DOTNET_EMSCRIPTEN_NODE_JS=%24{EMSDK_PATH}node/bin/node
export DOTNET_EMSCRIPTEN_NODE_JS=%24{EMSDK_PATH}node/22.16.0_64bit/bin/node
export DOTNET_EMSCRIPTEN_BINARYEN_ROOT=%24{EMSDK_PATH}

</_EmsdkPaths>
Expand All @@ -241,7 +241,7 @@ set EMSDK_PATH=%CURRENT_SCRIPT:~0,-1%\

set EMSDK_PYTHON=%EMSDK_PATH%python\python.exe
set DOTNET_EMSCRIPTEN_LLVM_ROOT=%EMSDK_PATH%bin\
set DOTNET_EMSCRIPTEN_NODE_JS=%EMSDK_PATH%node\bin\node.exe
set DOTNET_EMSCRIPTEN_NODE_JS=%EMSDK_PATH%node\22.16.0_64bit\bin\node.exe
set DOTNET_EMSCRIPTEN_BINARYEN_ROOT=%EMSDK_PATH%

</_EmsdkPaths>
Expand All @@ -251,7 +251,7 @@ import os
emsdk_path = os.path.dirname(os.path.dirname(os.path.realpath(os.getenv('EM_CONFIG')).replace('\\', '/')))

LLVM_ROOT = emsdk_path + '/bin'
NODE_JS = emsdk_path + '/node/bin/node'
NODE_JS = emsdk_path + '/node/22.16.0_64bit/bin/node'
BINARYEN_ROOT = emsdk_path

FROZEN_CACHE = bool(os.getenv('EM_FROZEN_CACHE', 'True'))
Expand All @@ -263,24 +263,39 @@ JS_ENGINES = [NODE_JS]

<RemoveDir Directories="$(EMSDK_PATH)" />

<PropertyGroup>
<InstallCmd>$(EMSDK_PATH)/emsdk$(EmsdkExt) install $(EmscriptenVersion)</InstallCmd>
<ActivateCmd>$(EMSDK_PATH)/emsdk$(EmsdkExt) activate $(EmscriptenVersion)</ActivateCmd>
<InstallCmd Condition="'$(HostOS)' == 'windows'">powershell -NonInteractive -command &quot;&amp; $(InstallCmd); Exit $LastExitCode &quot;</InstallCmd>
<ActivateCmd Condition="'$(HostOS)' == 'windows'">powershell -NonInteractive -command &quot;&amp; $(ActivateCmd); Exit $LastExitCode &quot;</ActivateCmd>
<PythonCmd Condition="'$(HostOS)' == 'windows' and '$(TargetsBrowser)' == 'true'">setlocal EnableDelayedExpansion &amp;&amp; call &quot;$([MSBuild]::NormalizePath('$(EMSDK_PATH)', 'emsdk_env.bat'))&quot; &amp;&amp; !EMSDK_PYTHON!</PythonCmd>
</PropertyGroup>

<Exec Command="git clone https://github.com/emscripten-core/emsdk.git emsdk"
WorkingDirectory="$(BrowserLocalPath)"
IgnoreStandardErrorWarningFormat="true" />
<Exec Command="git checkout $(EmscriptenVersion) &amp;&amp; $(InstallCmd) &amp;&amp; $(ActivateCmd)"
WorkingDirectory="$(EMSDK_PATH)"
IgnoreStandardErrorWarningFormat="true" />
<Exec Command="$(PythonCmd) -m pip install certifi &amp;&amp; $(PythonCmd) -m pip install pip-system-certs"
Condition="'$(HostOS)' == 'windows'"
WorkingDirectory="$(EMSDK_PATH)"
IgnoreStandardErrorWarningFormat="true" />

<ItemGroup>
<EmsdkFiles Condition="'%(PackageReference.Identity)' != 'runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.NETCore.Runtime.Wasm.Node.Transport' and '%(PackageReference.Identity)' != 'Microsoft.NET.Runtime.Emscripten.$(EmsdkVersion).Python.win-$(BuildArchitecture)'"
Include="$(NuGetPackageRoot)\$([System.String]::Copy(%(PackageReference.Identity)).ToLowerInvariant())\%(PackageReference.Version)\tools\**" />
<NodeFiles Condition="'%(PackageReference.Identity)' == 'runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.NETCore.Runtime.Wasm.Node.Transport'"
Include="$(NuGetPackageRoot)\$([System.String]::Copy(%(PackageReference.Identity)).ToLowerInvariant())\%(PackageReference.Version)\tools\$(NETCoreSdkPortableRuntimeIdentifier)\**" />
<PythonFiles Condition="'$(HostOS)' == 'windows' and '%(PackageReference.Identity)' == 'Microsoft.NET.Runtime.Emscripten.$(EmsdkVersion).Python.win-$(BuildArchitecture)'"
Include="$(NuGetPackageRoot)\$([System.String]::Copy(%(PackageReference.Identity)).ToLowerInvariant())\%(PackageReference.Version)\tools\**" />
<_EmsdkFiles Include="$(EMSDK_PATH)/upstream/**/*" />
<_PythonFiles Include="$(EMSDK_PATH)/python/3.13.3_64bit/**/*" />
<_ShellFiles Include="$(MSBuildThisFileDirectory)browser/env/**/*" />
</ItemGroup>

<Copy SourceFiles="@(EmsdkFiles)" DestinationFolder="$(EMSDK_PATH)/%(RecursiveDir)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<Copy SourceFiles="@(NodeFiles)" DestinationFolder="$(EMSDK_PATH)node/%(RecursiveDir)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>
<Copy Condition="'$(HostOS)' == 'windows'" SourceFiles="@(PythonFiles)" DestinationFolder="$(EMSDK_PATH)python/%(RecursiveDir)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
<Move SourceFiles="@(_EmsdkFiles)"
DestinationFolder="$(EMSDK_PATH)%(RecursiveDir)" />
<Move SourceFiles="@(_PythonFiles)"
DestinationFolder="$(EMSDK_PATH)/python/%(RecursiveDir)" />
<Copy SourceFiles="@(_ShellFiles)"
DestinationFolder="$(EMSDK_PATH)">
</Copy>
<Delete Files="$(EMSDK_PATH)/emsdk_env.bat;$(EMSDK_PATH)/emsdk_env.ps1" />
<ReadLinesFromFile File="$(EMSDK_PATH)emsdk_env$(ScriptExt)">
<Output TaskParameter="Lines" PropertyName="_EmsdkEnvFileText" />
</ReadLinesFromFile>
Expand All @@ -290,15 +305,6 @@ JS_ENGINES = [NODE_JS]
<WriteLinesToFile File="$(EMSDK_PATH)emscripten/.emscripten"
Overwrite="true"
Lines="$(_EmscriptenPaths)" />
<!-- Fixup files that were symlinks originally (on Linux/Mac, Windows has an equivalent already) -->
<ItemGroup>
<NodeModulesBinFiles Include="$(EMSDK_PATH)node\bin\npm.js" />
</ItemGroup>
<WriteLinesToFile
Condition="$([MSBuild]::IsOSPlatform(Linux)) or $([MSBuild]::IsOSPlatform(OSX))"
Lines="#!/usr/bin/env node;require('../lib/node_modules/%(Filename)/lib/cli.js')(process)"
File="%(NodeModulesBinFiles.RootDir)%(NodeModulesBinFiles.Directory)%(NodeModulesBinFiles.Filename)"
Overwrite="true" />

<PropertyGroup>
<ShouldProvisionEmscripten>false</ShouldProvisionEmscripten>
Expand Down
9 changes: 2 additions & 7 deletions src/mono/mono/mini/llvm-intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,12 @@ INTRINS(AESNI_AESDECLAST, x86_aesni_aesdeclast, X86)
INTRINS(AESNI_AESENC, x86_aesni_aesenc, X86)
INTRINS(AESNI_AESENCLAST, x86_aesni_aesenclast, X86)
INTRINS(AESNI_AESIMC, x86_aesni_aesimc, X86)

#endif
#if defined(TARGET_AMD64) || defined(TARGET_X86) || defined(TARGET_WASM)
INTRINS_OVR(SSE_SSUB_SATI8, ssub_sat, Generic, v128_i1_t)
INTRINS_OVR(SSE_USUB_SATI8, usub_sat, Generic, v128_i1_t)
INTRINS_OVR(SSE_SSUB_SATI16, ssub_sat, Generic, v128_i2_t)
INTRINS_OVR(SSE_USUB_SATI16, usub_sat, Generic, v128_i2_t)
#endif
#if defined(TARGET_AMD64) || defined(TARGET_X86) || defined(TARGET_WASM)
INTRINS_OVR(SSE_SADD_SATI8, sadd_sat, Generic, v128_i1_t)
INTRINS_OVR(SSE_UADD_SATI8, uadd_sat, Generic, v128_i1_t)
INTRINS_OVR(SSE_SADD_SATI16, sadd_sat, Generic, v128_i2_t)
Expand Down Expand Up @@ -298,10 +297,6 @@ INTRINS_OVR(WASM_PMAX_V4, fabs, Generic, sse_r4_t)
INTRINS_OVR(WASM_PMAX_V2, fabs, Generic, sse_r8_t)
INTRINS(WASM_Q15MULR_SAT_SIGNED, wasm_q15mulr_sat_signed, Wasm)
INTRINS(WASM_SHUFFLE, wasm_shuffle, Wasm)
INTRINS_OVR(WASM_SUB_SAT_SIGNED_V16, wasm_sub_sat_signed, Wasm, sse_i1_t)
INTRINS_OVR(WASM_SUB_SAT_SIGNED_V8, wasm_sub_sat_signed, Wasm, sse_i2_t)
INTRINS_OVR(WASM_SUB_SAT_UNSIGNED_V16, wasm_sub_sat_unsigned, Wasm, sse_i1_t)
INTRINS_OVR(WASM_SUB_SAT_UNSIGNED_V8, wasm_sub_sat_unsigned, Wasm, sse_i2_t)
INTRINS(WASM_SWIZZLE, wasm_swizzle, Wasm)
INTRINS(WASM_GET_EXCEPTION, wasm_get_exception, Wasm)
INTRINS(WASM_GET_EHSELECTOR, wasm_get_ehselector, Wasm)
Expand Down
8 changes: 4 additions & 4 deletions src/mono/mono/mini/simd-intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -6823,16 +6823,16 @@ emit_wasm_supported_intrinsics (

switch (arg0_type) {
case MONO_TYPE_I1:
c0 = INTRINS_WASM_SUB_SAT_SIGNED_V16;
c0 = INTRINS_SSE_SSUB_SATI8;
break;
case MONO_TYPE_I2:
c0 = INTRINS_WASM_SUB_SAT_SIGNED_V8;
c0 = INTRINS_SSE_SSUB_SATI16;
break;
case MONO_TYPE_U1:
c0 = INTRINS_WASM_SUB_SAT_UNSIGNED_V16;
c0 = INTRINS_SSE_USUB_SATI8;
break;
case MONO_TYPE_U2:
c0 = INTRINS_WASM_SUB_SAT_UNSIGNED_V8;
c0 = INTRINS_SSE_USUB_SATI16;
break;
}

Expand Down
2 changes: 1 addition & 1 deletion src/mono/wasi/wasi.proj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

<!-- Generate wasm-props.json -->
<ItemGroup Condition="'$(WasmEnableThreads)' == 'true'">
<WasmOptConfigurationFlags Include="--enable-threads;--enable-bulk-memory;--enable-sign-ext" />
<WasmOptConfigurationFlags Include="--enable-threads;--enable-bulk-memory;--enable-nontrapping-float-to-int;--enable-sign-ext" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/mono/wasm/build/WasmApp.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -911,8 +911,8 @@
<Target Name="_RunWasmOptPostLink" Condition="'$(WasmRunWasmOpt)' == 'true'">
<Error Condition="'$(_WasmOutputFileName)' == ''" Text="Could not determine %24(_WasmOutputFileName)" />

<Message Text="Running wasm-opt with --strip-target-features --post-emscripten -O2 --low-memory-unused --zero-filled-memory --pass-arg=directize-initial-contents-immutable --mvp-features --enable-multivalue --enable-mutable-globals --enable-reference-types --enable-sign-ext --enable-simd --enable-exception-handling --enable-bulk-memory @(WasmOptConfigurationFlags, ' ')" Importance="High" />
<Exec Command="wasm-opt$(_ExeExt) --strip-target-features --post-emscripten -O2 --low-memory-unused --zero-filled-memory --pass-arg=directize-initial-contents-immutable --mvp-features --enable-multivalue --enable-mutable-globals --enable-reference-types --enable-sign-ext --enable-simd --enable-exception-handling --enable-bulk-memory @(WasmOptConfigurationFlags, ' ') &quot;$(_WasmIntermediateOutputPath)$(_WasmOutputFileName)&quot; -o &quot;$(_WasmIntermediateOutputPath)$(_WasmOutputFileName)&quot;"
<Message Text="Running wasm-opt with --strip-target-features --post-emscripten -O2 --low-memory-unused --zero-filled-memory --pass-arg=directize-initial-contents-immutable --mvp-features --enable-multivalue --enable-mutable-globals --enable-reference-types --enable-sign-ext --enable-simd --enable-exception-handling --enable-bulk-memory --enable-nontrapping-float-to-int @(WasmOptConfigurationFlags, ' ')" Importance="High" />
<Exec Command="wasm-opt$(_ExeExt) --strip-target-features --post-emscripten -O2 --low-memory-unused --zero-filled-memory --pass-arg=directize-initial-contents-immutable --mvp-features --enable-multivalue --enable-mutable-globals --enable-reference-types --enable-sign-ext --enable-simd --enable-exception-handling --enable-bulk-memory --enable-nontrapping-float-to-int @(WasmOptConfigurationFlags, ' ') &quot;$(_WasmIntermediateOutputPath)$(_WasmOutputFileName)&quot; -o &quot;$(_WasmIntermediateOutputPath)$(_WasmOutputFileName)&quot;"
IgnoreStandardErrorWarningFormat="true"
EnvironmentVariables="@(WasmToolchainEnvVars)" />
</Target>
Expand Down
1 change: 1 addition & 0 deletions src/native/libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
if (CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
add_compile_options(-Wno-unsafe-buffer-usage)
add_compile_options(-Wno-cast-function-type-strict)
add_compile_options(-Wno-c++-keyword)
endif ()
endif ()

Expand Down
11 changes: 8 additions & 3 deletions src/native/libs/System.Globalization.Native/pal_icushim_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
static int32_t isLoaded = 0;
static int32_t isDataSet = 0;

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wjump-misses-init"
#endif

static void log_shim_error(const char* format, ...)
{
va_list args;
Expand Down Expand Up @@ -85,7 +90,7 @@ int32_t mono_wasi_load_icu_data(const void* pData)
static int32_t load_icu_data(const void* pData)
{

UErrorCode status = 0;
UErrorCode status = U_ZERO_ERROR;
udata_setCommonData(pData, &status);

if (U_FAILURE(status))
Expand Down Expand Up @@ -132,7 +137,7 @@ cstdlib_load_icu_data(const char *path)
goto error;
}

file_buf = malloc(sizeof(char) * (unsigned long)(file_buf_size + 1));
file_buf = (char *) malloc(sizeof(char) * (unsigned long)(file_buf_size + 1));

if (file_buf == NULL)
{
Expand Down Expand Up @@ -225,7 +230,7 @@ int32_t GlobalizationNative_LoadICU(void)
}
#endif

UErrorCode status = 0;
UErrorCode status = U_ZERO_ERROR;
UVersionInfo version;
// Request the CLDR version to perform basic ICU initialization and find out
// whether it worked.
Expand Down
Loading
Loading