Skip to content

Commit

Permalink
[wasm] Set WasmEnableWebcil to true by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdageek committed May 16, 2023
1 parent 55c4e8c commit 2585a04
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/libraries/sendtohelix-wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
<BuildWasmAppsJobsList>$(RepositoryEngineeringDir)testing\scenarios\BuildWasmAppsJobsList.txt</BuildWasmAppsJobsList>
<WorkItemPrefix Condition="'$(TestUsingWorkloads)' == 'true'">Workloads-</WorkItemPrefix>
<WorkItemPrefix Condition="'$(TestUsingWorkloads)' != 'true'">NoWorkload-</WorkItemPrefix>
<WorkItemPrefix Condition="'$(TestUsingWebcil)' == 'true'">$(WorkItemPrefix)Webcil-</WorkItemPrefix>
<WorkItemPrefix Condition="'$(TestUsingWebcil)' == 'false'">$(WorkItemPrefix)NoWebcil-</WorkItemPrefix>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/sendtohelixhelp.proj
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@

<HelixCommandPrefixItem Include="DOTNET_CLI_TELEMETRY_OPTOUT=1" />
<HelixCommandPrefixItem Condition="'$(TestUsingWorkloads)' == 'true'" Include="TEST_USING_WORKLOADS=true" />
<HelixCommandPrefixItem Condition="'$(TestUsingWebcil)' == 'true'" Include="TEST_USING_WEBCIL=true" />
<HelixCommandPrefixItem Condition="'$(TestUsingWebcil)' == 'false'" Include="TEST_USING_WEBCIL=false" />
</ItemGroup>

<PropertyGroup Condition="$(TargetRuntimeIdentifier.ToLowerInvariant().StartsWith('linux-bionic'))">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_WasmEnableThreads>$(WasmEnableThreads)</_WasmEnableThreads>
<_WasmEnableThreads Condition="'$(_WasmEnableThreads)' == ''">false</_WasmEnableThreads>
<_WasmEnableWebcil>$(WasmEnableWebcil)</_WasmEnableWebcil>
<_WasmEnableWebcil Condition="'$(_WasmEnableWebcil)' == ''">false</_WasmEnableWebcil>
<_WasmEnableWebcil Condition="'$(_WasmEnableWebcil)' == ''">true</_WasmEnableWebcil>
<_BlazorWebAssemblyStartupMemoryCache>$(BlazorWebAssemblyStartupMemoryCache)</_BlazorWebAssemblyStartupMemoryCache>
<_BlazorWebAssemblyJiterpreter>$(BlazorWebAssemblyJiterpreter)</_BlazorWebAssemblyJiterpreter>
<_BlazorWebAssemblyRuntimeOptions>$(BlazorWebAssemblyRuntimeOptions)</_BlazorWebAssemblyRuntimeOptions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<EnableAggressiveTrimming>true</EnableAggressiveTrimming>
<PublishTrimmed>true</PublishTrimmed>
<WasmEnableLegacyJsInterop>false</WasmEnableLegacyJsInterop>
<WasmEnableWebcil>true</WasmEnableWebcil>
<WasmEnableWebcil>false</WasmEnableWebcil>
<WasmEmitSymbolMap>true</WasmEmitSymbolMap>
<EmccEnableAssertions>true</EmccEnableAssertions>
<EmccEnvironment>web,worker</EmccEnvironment>
Expand Down
16 changes: 9 additions & 7 deletions src/mono/wasm/Wasm.Build.Tests/BuildTestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ static BuildTestBase()
Console.WriteLine($"=============== Running with {(s_buildEnv.IsWorkload ? "Workloads" : "No workloads")} ===============");
if (UseWebcil)
Console.WriteLine($"=============== Using webcil-in-wasm ===============");
else
Console.WriteLine($"=============== Webcil disabled ===============");
Console.WriteLine($"==============================================================================================");
Console.WriteLine("");
}
Expand Down Expand Up @@ -343,9 +345,9 @@ protected static BuildArgs ExpandBuildArgs(BuildArgs buildArgs, string extraProp
extraProperties += $"\n<EmccVerbose>{s_isWindows}</EmccVerbose>\n";
}

if (UseWebcil)
if (!UseWebcil)
{
extraProperties += "<WasmEnableWebcil>true</WasmEnableWebcil>\n";
extraProperties += "<WasmEnableWebcil>false</WasmEnableWebcil>\n";
}

extraItems += "<WasmExtraFilesToDeploy Include='index.html' />";
Expand Down Expand Up @@ -508,8 +510,8 @@ public string CreateWasmTemplateProject(string id, string template = "wasmbrowse
extraProperties += "<TreatWarningsAsErrors>true</TreatWarningsAsErrors>";
if (runAnalyzers)
extraProperties += "<RunAnalyzers>true</RunAnalyzers>";
if (UseWebcil)
extraProperties += "<WasmEnableWebcil>true</WasmEnableWebcil>";
if (!UseWebcil)
extraProperties += "<WasmEnableWebcil>false</WasmEnableWebcil>";

// TODO: Can be removed after updated templates propagate in.
string extraItems = string.Empty;
Expand All @@ -533,8 +535,8 @@ public string CreateBlazorWasmTemplateProject(string id)
.EnsureSuccessful();

string projectFile = Path.Combine(_projectDir!, $"{id}.csproj");
if (UseWebcil)
AddItemsPropertiesToProject(projectFile, "<WasmEnableWebcil>true</WasmEnableWebcil>");
if (!UseWebcil)
AddItemsPropertiesToProject(projectFile, "<WasmEnableWebcil>false</WasmEnableWebcil>");
return projectFile;
}

Expand Down Expand Up @@ -595,7 +597,7 @@ public string CreateBlazorWasmTemplateProject(string id)
label, // same as the command name
$"-bl:{logPath}",
$"-p:Configuration={config}",
UseWebcil ? "-p:WasmEnableWebcil=true" : string.Empty,
!UseWebcil ? "-p:WasmEnableWebcil=false" : string.Empty,
"-p:BlazorEnableCompression=false",
"-nr:false",
setWasmDevel ? "-p:_WasmDevel=true" : string.Empty
Expand Down
6 changes: 3 additions & 3 deletions src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ if [%TEST_USING_WORKLOADS%] == [true] (
) else (
set SDK_HAS_WORKLOAD_INSTALLED=false
)
if [%TEST_USING_WEBCIL%] == [true] (
set USE_WEBCIL_FOR_TESTS=true
) else (
if [%TEST_USING_WEBCIL%] == [false] (
set USE_WEBCIL_FOR_TESTS=false
) else (
set USE_WEBCIL_FOR_TESTS=true
)

if [%HELIX_CORRELATION_PAYLOAD%] NEQ [] (
Expand Down
6 changes: 3 additions & 3 deletions src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ function set_env_vars()
export SDK_HAS_WORKLOAD_INSTALLED=false
fi

if [ "x$TEST_USING_WEBCIL" = "xtrue" ]; then
export USE_WEBCIL_FOR_TESTS=true
else
if [ "x$TEST_USING_WEBCIL" = "xfalse" ]; then
export USE_WEBCIL_FOR_TESTS=false
else
export USE_WEBCIL_FOR_TESTS=true
fi

local _SDK_DIR=
Expand Down
6 changes: 3 additions & 3 deletions src/mono/wasm/build/WasmApp.targets
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
- $(WasmEnableLegacyJsInterop) - Include support for legacy JS interop. Defaults to true.
- $(WasmEnableExceptionHandling) - Enable support for the WASM post MVP Exception Handling runtime extension.
- $(WasmEnableSIMD) - Enable support for the WASM post MVP SIMD runtime extension.
- $(WasmEnableWebcil) - Enable conversion of assembly .dlls to Webcil wrapped in .wasm
- $(WasmEnableWebcil) - Enable conversion of assembly .dlls to Webcil wrapped in .wasm (default: true)
- $(WasmIncludeFullIcuData) - Loads full ICU data (icudt.dat). Defaults to false. Only applicable when InvariantGlobalization=false.
- $(WasmIcuDataFileName) - Name/path of ICU globalization file loaded to app. Only when InvariantGloblization=false and WasmIncludeFullIcuData=false.
- $(WasmAllowUndefinedSymbols) - Controls whether undefined symbols are allowed or not,
Expand Down Expand Up @@ -133,8 +133,8 @@
<!-- if DebuggerSupport==true, then ensure that WasmDebugLevel isn't disabling debugging -->
<WasmDebugLevel Condition="('$(WasmDebugLevel)' == '' or '$(WasmDebugLevel)' == '0') and ('$(DebuggerSupport)' == 'true' or '$(Configuration)' == 'Debug')">-1</WasmDebugLevel>

<!-- by default, don't package assemblies as webcil -->
<WasmEnableWebcil Condition="'$(WasmEnableWebcil)' == ''">false</WasmEnableWebcil>
<!-- by default, package assemblies as webcil -->
<WasmEnableWebcil Condition="'$(WasmEnableWebcil)' == ''">true</WasmEnableWebcil>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 2585a04

Please sign in to comment.