Skip to content

Commit d388585

Browse files
authored
[wasm] Introduce <InvariantTimezone> build flag (dotnet#87284)
1 parent e80ef86 commit d388585

File tree

19 files changed

+220
-41
lines changed

19 files changed

+220
-41
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Timezone Invariant Mode
2+
3+
Author: [Pavel Savara](https://github.com/pavelsavara)
4+
5+
It's currently only available for Browser OS.
6+
The timezone database is not part of the browser environment (as opposed to other operating systems).
7+
Therefore dotnet bundles the timezone database as binary as part of the runtime.
8+
That makes download size larger and application startup slower.
9+
If your application doesn't need to work with time zone information, you could use this feature to make the runtime about 200KB smaller.
10+
11+
You enable it in project file:
12+
```xml
13+
<PropertyGroup>
14+
<InvariantTimezone>true</InvariantTimezone>
15+
</PropertyGroup>
16+
```

eng/testing/scenarios/BuildWasmAppsJobsList.txt

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Wasm.Build.Tests.ConfigSrcTests
1414
Wasm.Build.Tests.IcuShardingTests
1515
Wasm.Build.Tests.HybridGlobalizationTests
1616
Wasm.Build.Tests.InvariantGlobalizationTests
17+
Wasm.Build.Tests.InvariantTimezoneTests
1718
Wasm.Build.Tests.MainWithArgsTests
1819
Wasm.Build.Tests.NativeBuildTests
1920
Wasm.Build.Tests.NativeLibraryTests

src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Copyright (c) .NET Foundation. All rights reserved.
4747

4848
<!-- Runtime feature defaults to trim unnecessary code -->
4949
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
50+
<InvariantTimezone Condition="'$(BlazorEnableTimeZoneSupport)' == 'false'">true</InvariantTimezone>
51+
<InvariantTimezone Condition="'$(InvariantTimezone)' == ''">false</InvariantTimezone>
5052
<EventSourceSupport Condition="'$(EventSourceSupport)' == ''">false</EventSourceSupport>
5153
<UseSystemResourceKeys Condition="'$(UseSystemResourceKeys)' == ''">true</UseSystemResourceKeys>
5254
<EnableUnsafeUTF7Encoding Condition="'$(EnableUnsafeUTF7Encoding)' == ''">false</EnableUnsafeUTF7Encoding>

src/mono/sample/wasm/browser-advanced/Program.cs

+20
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ public partial class Test
1313
public static int Main(string[] args)
1414
{
1515
Console.WriteLine ("Hello, World!");
16+
17+
var start = DateTime.UtcNow;
18+
var timezonesCount = TimeZoneInfo.GetSystemTimeZones().Count;
19+
var end = DateTime.UtcNow;
20+
Console.WriteLine($"Found {timezonesCount} timezones in the TZ database in {end-start}");
21+
22+
TimeZoneInfo utc = TimeZoneInfo.FindSystemTimeZoneById("UTC");
23+
Console.WriteLine($"{utc.DisplayName} BaseUtcOffset is {utc.BaseUtcOffset}");
24+
25+
try
26+
{
27+
TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("Asia/Tokyo");
28+
Console.WriteLine($"{tst.DisplayName} BaseUtcOffset is {tst.BaseUtcOffset}");
29+
}
30+
catch (TimeZoneNotFoundException tznfe)
31+
{
32+
Console.WriteLine($"Could not find Asia/Tokyo: {tznfe.Message}");
33+
}
34+
35+
1636
return 0;
1737
}
1838

src/mono/sample/wasm/browser-advanced/Wasm.Advanced.Sample.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<EnableAggressiveTrimming>true</EnableAggressiveTrimming>
55
<PublishTrimmed>true</PublishTrimmed>
6+
<InvariantTimezone>true</InvariantTimezone>
67
<WasmEnableLegacyJsInterop>false</WasmEnableLegacyJsInterop>
78
<WasmEnableWebcil>false</WasmEnableWebcil>
89
<WasmEmitSymbolMap>true</WasmEmitSymbolMap>

src/mono/wasi/Wasi.Build.Tests/WasiTemplateTests.cs

+28-6
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ public void ConsoleBuildThenPublish(string config)
7474
UseCache: false));
7575
}
7676

77-
public static TheoryData<string, bool> TestDataForConsolePublishAndRun()
77+
public static TheoryData<string, bool, bool> TestDataForConsolePublishAndRun()
7878
{
79-
var data = new TheoryData<string, bool>();
80-
data.Add("Debug", false);
81-
data.Add("Debug", true);
82-
data.Add("Release", false); // Release relinks by default
79+
var data = new TheoryData<string, bool, bool>();
80+
data.Add("Debug", false, false);
81+
data.Add("Debug", true, true);
82+
data.Add("Release", false, false); // Release relinks by default
8383
return data;
8484
}
8585

8686
[ConditionalTheory(typeof(BuildTestBase), nameof(IsUsingWorkloads))]
8787
[ActiveIssue("https://github.com/dotnet/runtime/issues/82515", TestPlatforms.Windows)]
8888
[MemberData(nameof(TestDataForConsolePublishAndRun))]
89-
public void ConsolePublishAndRunForSingleFileBundle(string config, bool relinking)
89+
public void ConsolePublishAndRunForSingleFileBundle(string config, bool relinking, bool invariantTimezone)
9090
{
9191
string id = $"{config}_{Path.GetRandomFileName()}";
9292
string projectFile = CreateWasmTemplateProject(id, "wasiconsole");
@@ -96,6 +96,8 @@ public void ConsolePublishAndRunForSingleFileBundle(string config, bool relinkin
9696
string extraProperties = "<WasmSingleFileBundle>true</WasmSingleFileBundle>";
9797
if (relinking)
9898
extraProperties += "<WasmBuildNative>true</WasmBuildNative>";
99+
if (invariantTimezone)
100+
extraProperties += "<InvariantTimezone>true</InvariantTimezone>";
99101

100102
AddItemsPropertiesToProject(projectFile, extraProperties);
101103

@@ -125,6 +127,15 @@ public void ConsolePublishAndRunForSingleFileBundle(string config, bool relinkin
125127
Assert.Contains("args[0] = x", res.Output);
126128
Assert.Contains("args[1] = y", res.Output);
127129
Assert.Contains("args[2] = z", res.Output);
130+
if(invariantTimezone)
131+
{
132+
Assert.Contains("Could not find Asia/Tokyo", res.Output);
133+
}
134+
else
135+
{
136+
Assert.Contains("Asia/Tokyo BaseUtcOffset is 09:00:00", res.Output);
137+
}
138+
128139
}
129140

130141
private static readonly string s_simpleMainWithArgs = """
@@ -133,6 +144,17 @@ public void ConsolePublishAndRunForSingleFileBundle(string config, bool relinkin
133144
Console.WriteLine("Hello, Wasi Console!");
134145
for (int i = 0; i < args.Length; i ++)
135146
Console.WriteLine($"args[{i}] = {args[i]}");
147+
148+
try
149+
{
150+
TimeZoneInfo tst = TimeZoneInfo.FindSystemTimeZoneById("Asia/Tokyo");
151+
Console.WriteLine($"{tst.DisplayName} BaseUtcOffset is {tst.BaseUtcOffset}");
152+
}
153+
catch (TimeZoneNotFoundException tznfe)
154+
{
155+
Console.WriteLine($"Could not find Asia/Tokyo: {tznfe.Message}");
156+
}
157+
136158
return 42;
137159
""";
138160
}

src/mono/wasi/build/WasiApp.Native.targets

+7-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
<WasmBuildNative Condition="'$(RunAOTCompilation)' == 'true' and '$(RunAOTCompilationAfterBuild)' == 'true'">true</WasmBuildNative>
6464

6565
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmEnableSIMD)' == 'true'">true</WasmBuildNative>
66+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantTimezone)' == 'true'">true</WasmBuildNative>
67+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantGlobalization)' == 'true'">true</WasmBuildNative>
6668

6769
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeFileReference->Count()) > 0" >true</WasmBuildNative>
6870

@@ -75,6 +77,8 @@
7577
<WasmBuildNative Condition="'$(RunAOTCompilation)' == 'true'">true</WasmBuildNative>
7678
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeFileReference->Count()) > 0" >true</WasmBuildNative>
7779
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmEnableSIMD)' == 'true'">true</WasmBuildNative>
80+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantTimezone)' == 'true'">true</WasmBuildNative>
81+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantGlobalization)' == 'true'">true</WasmBuildNative>
7882

7983
<!-- not aot, not trimmed app, no reason to relink -->
8084
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(PublishTrimmed)' != 'true'">false</WasmBuildNative>
@@ -168,8 +172,9 @@
168172

169173
<ItemGroup>
170174
<_WasmCommonCFlags Include="-DGEN_PINVOKE=1" />
171-
<_WasmCommonCFlags Condition="'$(WasmSingleFileBundle)' == 'true'" Include="-DWASM_SINGLE_FILE=1" />
175+
<_WasmCommonCFlags Condition="'$(WasmSingleFileBundle)' == 'true'" Include="-DWASM_SINGLE_FILE=1" />
172176
<_WasmCommonCFlags Condition="'$(InvariantGlobalization)' == 'true'" Include="-DINVARIANT_GLOBALIZATION=1" />
177+
<_WasmCommonCFlags Condition="'$(InvariantTimezone)' == 'true'" Include="-DINVARIANT_TIMEZONE=1" />
173178

174179
<!-- Adding optimization flag at the top, so it gets precedence -->
175180
<!--<_EmccCFlags Include="$(EmccCompileOptimizationFlag)" />-->
@@ -273,6 +278,7 @@
273278
<!--<_WasmNativeFileForLinking Include="%(_BitcodeFile.ObjectFile)" />-->
274279
<!--<_WasmNativeFileForLinking Include="%(_WasmSourceFileToCompile.ObjectFile)" />-->
275280
<_MonoRuntimeComponentDontLink Include="libmono-component-diagnostics_tracing-static.a" />
281+
<_MonoRuntimeComponentDontLink Include="wasm-bundled-timezones.a" Condition="'$(InvariantTimezone)' == 'true'"/>
276282

277283
<_WasmNativeFileForLinking
278284
Include="$(MicrosoftNetCoreAppRuntimePackRidNativeDir)*.a"

src/mono/wasi/build/WasiApp.targets

+7-5
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
Public properties (optional):
1212
- $(WasmAppDir) - AppBundle dir (Defaults to `$(OutputPath)\$(Configuration)\AppBundle`)
1313
- $(WasmMainAssemblyFileName)- Defaults to $(TargetFileName)
14-
- $(WasmBuildNative) - Whenever to build the native executable. Defaults to false.
15-
- $(WasmNativeStrip) - Whenever to strip the native executable. Defaults to true.
16-
- $(WasmLinkIcalls) - Whenever to link out unused icalls. Defaults to $(WasmBuildNative).
14+
- $(WasmBuildNative) - Whether to build the native executable. Defaults to false.
15+
- $(WasmNativeStrip) - Whether to strip the native executable. Defaults to true.
16+
- $(WasmLinkIcalls) - Whether to link out unused icalls. Defaults to $(WasmBuildNative).
1717
- $(RunAOTCompilation) - Defaults to false.
1818
1919
- $(WasmDebugLevel)
@@ -24,11 +24,12 @@
2424
- $(WasmNativeDebugSymbols) - Build with native debug symbols, useful only with `$(RunAOTCompilation)`, or `$(WasmBuildNative)`
2525
Defaults to true.
2626
- $(WasmEmitSymbolMap) - Generates a `dotnet.js.symbols` file with a map of wasm function number to name.
27-
- $(WasmDedup) - Whenever to dedup generic instances when using AOT. Defaults to true.
27+
- $(WasmDedup) - Whether to dedup generic instances when using AOT. Defaults to true.
2828
2929
- $(WasmProfilers) - Profilers to use
3030
- $(AOTProfilePath) - profile data file to be used for profile-guided optimization
31-
- $(InvariantGlobalization) - Whenever to disable ICU. Defaults to false.
31+
- $(InvariantGlobalization) - Whether to disable ICU. Defaults to false.
32+
- $(InvariantTimezone) - Whether to disable Timezone database. Defaults to false.
3233
3334
- $(WasmResolveAssembliesBeforeBuild) - Resolve the assembly dependencies. Defaults to false
3435
- $(WasmAssemblySearchPaths) - used for resolving assembly dependencies
@@ -119,6 +120,7 @@
119120
<WasmSingleFileBundle Condition="'$(WasmSingleFileBundle)' == ''">false</WasmSingleFileBundle>
120121
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmSingleFileBundle)' == 'true'">true</WasmBuildNative>
121122
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantGlobalization)' == 'true'">true</WasmBuildNative>
123+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantTimezone)' == 'true'">true</WasmBuildNative>
122124

123125
<WasiBundleAssemblies Condition="'$(WasiBundleAssemblies)' == ''">true</WasiBundleAssemblies>
124126
<WasiRunner Condition="'$(WasiRunner)' == ''">wasmtime</WasiRunner>

src/mono/wasi/runtime/driver.c

+4
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ int32_t monoeg_g_hasenv(const char *variable);
6363
void mono_free (void*);
6464
int32_t mini_parse_debug_option (const char *option);
6565
char *mono_method_get_full_name (MonoMethod *method);
66+
#ifndef INVARIANT_TIMEZONE
6667
extern void mono_register_timezones_bundle (void);
68+
#endif /* INVARIANT_TIMEZONE */
6769
#ifdef WASM_SINGLE_FILE
6870
extern void mono_register_assemblies_bundle (void);
6971
#ifndef INVARIANT_GLOBALIZATION
@@ -439,7 +441,9 @@ mono_wasm_load_runtime (const char *unused, int debug_level)
439441

440442
mini_parse_debug_option ("top-runtime-invoke-unhandled");
441443

444+
#ifndef INVARIANT_TIMEZONE
442445
mono_register_timezones_bundle ();
446+
#endif /* INVARIANT_TIMEZONE */
443447
#ifdef WASM_SINGLE_FILE
444448
mono_register_assemblies_bundle ();
445449
#endif

src/mono/wasi/wasi.proj

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
</Target>
6767

6868
<UsingTask TaskName="EmitBundleObjectFiles" AssemblyFile="$(MonoTargetsTasksAssemblyPath)" />
69-
<Target Name="GenerateTimezonesArchive" Returns="@(_WasmArchivedTimezones)">
69+
<Target Name="GenerateTimezonesArchive" Returns="@(_WasmArchivedTimezones)" Condition="'$(InvariantTimezone)' != 'true'">
7070
<PropertyGroup>
7171
<_WasmTimezonesPath>$([MSBuild]::NormalizePath('$(PkgSystem_Runtime_TimeZoneData)', 'contentFiles', 'any', 'any', 'data'))</_WasmTimezonesPath>
7272
<_WasmTimezonesBundleObjectFile>wasm-bundled-timezones.o</_WasmTimezonesBundleObjectFile>

src/mono/wasm/Wasm.Build.Tests/InvariantGlobalizationTests.cs

+1-20
Original file line numberDiff line numberDiff line change
@@ -54,29 +54,10 @@ private void TestInvariantGlobalization(BuildArgs buildArgs, bool? invariantGlob
5454
if (dotnetWasmFromRuntimePack == null)
5555
dotnetWasmFromRuntimePack = !(buildArgs.AOT || buildArgs.Config == "Release");
5656

57-
string programText = @"
58-
using System;
59-
using System.Globalization;
60-
61-
// https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md#cultures-and-culture-data
62-
try
63-
{
64-
CultureInfo culture = new (""es-ES"", false);
65-
Console.WriteLine($""es-ES: Is Invariant LCID: {culture.LCID == CultureInfo.InvariantCulture.LCID}, NativeName: {culture.NativeName}"");
66-
}
67-
catch (CultureNotFoundException cnfe)
68-
{
69-
Console.WriteLine($""Could not create es-ES culture: {cnfe.Message}"");
70-
}
71-
72-
Console.WriteLine($""CurrentCulture.NativeName: {CultureInfo.CurrentCulture.NativeName}"");
73-
return 42;
74-
";
75-
7657
BuildProject(buildArgs,
7758
id: id,
7859
new BuildProjectOptions(
79-
InitProject: () => File.WriteAllText(Path.Combine(_projectDir!, "Program.cs"), programText),
60+
InitProject: () => File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "Wasm.Buid.Tests.Programs", "InvariantGlobalization.cs"), Path.Combine(_projectDir!, "Program.cs")),
8061
DotnetWasmFromRuntimePack: dotnetWasmFromRuntimePack,
8162
GlobalizationMode: invariantGlobalization == true ? GlobalizationMode.Invariant : null));
8263

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using System.Collections.Generic;
5+
using System.IO;
6+
using Xunit;
7+
using Xunit.Abstractions;
8+
9+
#nullable enable
10+
11+
namespace Wasm.Build.Tests
12+
{
13+
public class InvariantTimezoneTests : BuildTestBase
14+
{
15+
public InvariantTimezoneTests(ITestOutputHelper output, SharedBuildPerTestClassFixture buildContext)
16+
: base(output, buildContext)
17+
{
18+
}
19+
20+
public static IEnumerable<object?[]> InvariantTimezoneTestData(bool aot, RunHost host)
21+
=> ConfigWithAOTData(aot)
22+
.Multiply(
23+
new object?[] { null },
24+
new object?[] { false },
25+
new object?[] { true })
26+
.WithRunHosts(host)
27+
.UnwrapItemsAsArrays();
28+
29+
[Theory]
30+
[MemberData(nameof(InvariantTimezoneTestData), parameters: new object[] { /*aot*/ false, RunHost.All })]
31+
[MemberData(nameof(InvariantTimezoneTestData), parameters: new object[] { /*aot*/ true, RunHost.All })]
32+
public void AOT_InvariantTimezone(BuildArgs buildArgs, bool? invariantTimezone, RunHost host, string id)
33+
=> TestInvariantTimezone(buildArgs, invariantTimezone, host, id);
34+
35+
[Theory]
36+
[MemberData(nameof(InvariantTimezoneTestData), parameters: new object[] { /*aot*/ false, RunHost.All })]
37+
public void RelinkingWithoutAOT(BuildArgs buildArgs, bool? invariantTimezone, RunHost host, string id)
38+
=> TestInvariantTimezone(buildArgs, invariantTimezone, host, id,
39+
extraProperties: "<WasmBuildNative>true</WasmBuildNative>",
40+
dotnetWasmFromRuntimePack: false);
41+
42+
private void TestInvariantTimezone(BuildArgs buildArgs, bool? invariantTimezone,
43+
RunHost host, string id, string extraProperties="", bool? dotnetWasmFromRuntimePack=null)
44+
{
45+
string projectName = $"invariant_{invariantTimezone?.ToString() ?? "unset"}";
46+
if (invariantTimezone != null)
47+
extraProperties = $"{extraProperties}<InvariantTimezone>{invariantTimezone}</InvariantTimezone>";
48+
49+
buildArgs = buildArgs with { ProjectName = projectName };
50+
buildArgs = ExpandBuildArgs(buildArgs, extraProperties);
51+
52+
if (dotnetWasmFromRuntimePack == null)
53+
dotnetWasmFromRuntimePack = !(buildArgs.AOT || buildArgs.Config == "Release");
54+
55+
BuildProject(buildArgs,
56+
id: id,
57+
new BuildProjectOptions(
58+
InitProject: () => File.Copy(Path.Combine(BuildEnvironment.TestAssetsPath, "Wasm.Buid.Tests.Programs", "InvariantTimezone.cs"), Path.Combine(_projectDir!, "Program.cs")),
59+
DotnetWasmFromRuntimePack: dotnetWasmFromRuntimePack));
60+
61+
string output = RunAndTestWasmApp(buildArgs, expectedExitCode: 42, host: host, id: id);
62+
Assert.Contains("UTC BaseUtcOffset is 0", output);
63+
if (invariantTimezone == true)
64+
{
65+
Assert.Contains("Could not find Asia/Tokyo", output);
66+
}
67+
else
68+
{
69+
Assert.Contains("Asia/Tokyo BaseUtcOffset is 09:00:00", output);
70+
}
71+
}
72+
}
73+
}

src/mono/wasm/build/WasmApp.Native.targets

+9
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@
115115
<!-- removing legacy interop needs relink -->
116116
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmEnableLegacyJsInterop)' == 'false'" >true</WasmBuildNative>
117117

118+
<!-- InvariantTimezone and InvariantGlobalization need rebuild -->
119+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantTimezone)' == 'true'">true</WasmBuildNative>
120+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantGlobalization)' == 'true'">true</WasmBuildNative>
121+
118122
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and @(NativeFileReference->Count()) > 0" >true</WasmBuildNative>
119123

120124
<WasmBuildNative Condition="'$(WasmBuildNative)' == ''">false</WasmBuildNative>
@@ -129,6 +133,10 @@
129133
<!-- removing legacy interop needs relink -->
130134
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(WasmEnableLegacyJsInterop)' == 'false'" >true</WasmBuildNative>
131135

136+
<!-- InvariantTimezone and InvariantGlobalization need rebuild -->
137+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantTimezone)' == 'true'">true</WasmBuildNative>
138+
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(InvariantGlobalization)' == 'true'">true</WasmBuildNative>
139+
132140
<!-- not aot, not trimmed app, no reason to relink -->
133141
<WasmBuildNative Condition="'$(WasmBuildNative)' == '' and '$(PublishTrimmed)' != 'true'">false</WasmBuildNative>
134142

@@ -219,6 +227,7 @@
219227
<_EmccCFlags Include="-DENABLE_AOT=1" Condition="'$(_WasmShouldAOT)' == 'true'" />
220228
<_EmccCFlags Include="-DDRIVER_GEN=1" Condition="'$(_WasmShouldAOT)' == 'true'" />
221229
<_EmccCFlags Include="-DINVARIANT_GLOBALIZATION=1" Condition="'$(InvariantGlobalization)' == 'true'" />
230+
<_EmccCFlags Include="-DINVARIANT_TIMEZONE=1" Condition="'$(InvariantTimezone)' == 'true'" />
222231
<_EmccCFlags Include="-DLINK_ICALLS=1" Condition="'$(WasmLinkIcalls)' == 'true'" />
223232
<_EmccCFlags Include="-DENABLE_AOT_PROFILER=1" Condition="$(WasmProfilers.Contains('aot'))" />
224233
<_EmccCFlags Include="-DENABLE_BROWSER_PROFILER=1" Condition="$(WasmProfilers.Contains('browser'))" />

0 commit comments

Comments
 (0)