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
4 changes: 2 additions & 2 deletions src/libraries/Common/tests/Tests/System/StringTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7721,8 +7721,8 @@ public static void InternTestCanReturnNull()
Assert.False(s.IsNormalized(NormalizationForm.FormC), "String should be not normalized when checking with FormC");
Assert.False(s.IsNormalized(NormalizationForm.FormD), "String should be not normalized when checking with FormD");

// Browser's, iOS's, MacCatalyst's, and tvOS's ICU do not support FormKC and FormKD
bool supportsKCKD = !PlatformDetection.IsBrowser && !PlatformDetection.IsiOS && !PlatformDetection.IsMacCatalyst && !PlatformDetection.IstvOS;
// Some platforms' ICUs do not support FormKC and FormKD
bool supportsKCKD = !PlatformDetection.IsBrowser && !PlatformDetection.IsWasi && !PlatformDetection.IsiOS && !PlatformDetection.IsMacCatalyst && !PlatformDetection.IstvOS;

if (supportsKCKD)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser;$(NetCoreAppCurrent)-wasi</TargetFrameworks>
<DefineConstants Condition="'$(TargetOS)' == 'browser'">$(DefineConstants);TARGET_BROWSER</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NoWarn>$(NoWarn),1718,SYSLIB0013</NoWarn>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace System.Tests
{
public static class ArgIteratorTests
{
[ActiveIssue("https://github.com/dotnet/runtime/issues/39343", TestPlatforms.Browser)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/39343", TestPlatforms.Browser | TestPlatforms.Wasi)]
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsArgIteratorSupported))]
public static void ArgIterator_GetRemainingCount_GetNextArg()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ static TimeZoneInfoTests()
// Name abbreviations, if available, are used instead
public static IEnumerable<object[]> Platform_TimeZoneNamesTestData()
{
if (PlatformDetection.IsBrowser)
if (PlatformDetection.IsBrowser || PlatformDetection.IsWasi)
return new TheoryData<TimeZoneInfo, string, string, string, string, string>
{
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) America/Los_Angeles", null, "PST", "PDT", null },
Expand Down Expand Up @@ -2051,9 +2051,9 @@ public static void TimeZoneDisplayNames_Unix(TimeZoneInfo timeZone)
{
bool isUtc = s_UtcAliases.Contains(timeZone.Id, StringComparer.OrdinalIgnoreCase);

if (PlatformDetection.IsBrowser)
if (PlatformDetection.IsBrowser || PlatformDetection.IsWasi)
{
// Browser platform doesn't have full ICU names, but uses the IANA IDs and abbreviations instead.
// WASM platforms don't have full ICU names, but use the IANA IDs and abbreviations instead.

// The display name will be the offset plus the ID.
// The offset is checked separately in TimeZoneInfo_DisplayNameStartsWithOffset
Expand Down Expand Up @@ -2452,7 +2452,7 @@ public static IEnumerable<object[]> AlternativeName_TestData()
}
}

[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBrowser), nameof(PlatformDetection.IsNotWasi))]
[MemberData(nameof(AlternativeName_TestData))]
public static void UsingAlternativeTimeZoneIdsTest(string windowsId, string ianaId)
{
Expand Down
2 changes: 0 additions & 2 deletions src/mono/wasi/build/WasiApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,7 @@
<_WasiLinkStepArgs Condition="'$(OS)' == 'Windows_NT'" Include="&quot;$([System.String]::new(%(_WasiFilePathForFixup.Identity)).Replace('\', '/'))&quot;" />
<_WasiLinkStepArgs Condition="'$(OS)' != 'Windows_NT'" Include="@(_WasiFilePathForFixup -> '&quot;%(Identity)&quot;')" />

<_WasiLinkStepArgs Include="-Wl,--export=malloc,--export=free,--export=__heap_base,--export=__data_end" />
<!-- keep in sync with src\mono\wasi\wasi.proj -->
<!-- keep in sync with src\native\libs\CMakeLists.txt -->
<_WasiLinkStepArgs Include="-Wl,-z,stack-size=8388608,-lwasi-emulated-process-clocks,-lwasi-emulated-signal,-lwasi-emulated-mman,-lwasi-emulated-pthread"/>
<!--
this together with some DLLImports makes dependency on wasi:[email protected]
Expand Down
1 change: 0 additions & 1 deletion src/mono/wasi/wasi.proj
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
<_WasiCompileFlags Include="-D_WASI_EMULATED_MMAN"/>
<_WasiCompileFlags Include="-D_WASI_EMULATED_PTHREAD"/>
<!-- keep in sync with src\mono\wasi\build\WasiApp.targets -->
<!-- keep in sync with src\native\libs\CMakeLists.txt -->
<_WasiLinkFlags Include="-Wl,-z,stack-size=8388608,--initial-memory=52428800,-lwasi-emulated-process-clocks,-lwasi-emulated-signal,-lwasi-emulated-mman,-lwasi-emulated-pthread"/>
</ItemGroup>

Expand Down
4 changes: 0 additions & 4 deletions src/native/libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,13 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)

if (CLR_CMAKE_TARGET_WASI)
set(HOST_WASI 1)
add_compile_options(-Wno-unused-variable)
add_compile_options(-Wno-unused-parameter)
add_compile_options(-Wno-gnu-statement-expression)
add_compile_options(-DHOST_WASI)
add_compile_options(-D_WASI_EMULATED_PROCESS_CLOCKS)
add_compile_options(-D_WASI_EMULATED_SIGNAL)
add_compile_options(-D_WASI_EMULATED_MMAN)
add_compile_options(-D_WASI_EMULATED_PTHREAD)
# keep in sync with src\mono\wasi\build\WasiApp.targets
# keep in sync with src\mono\wasi\wasi.proj
add_link_options(-Wl,-z,stack-size=1048576,--initial-memory=5242880,--max-memory=52428800,-lwasi-emulated-process-clocks,-lwasi-emulated-signal,-lwasi-emulated-mman,-lwasi-emulated-pthread)
endif ()

if (CLR_CMAKE_TARGET_ANDROID)
Expand Down
Loading