Skip to content

[wasm][aot] Blazor .NET 8: llvm-size.exe command line args too long #97634

Open

Description

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After upgrading to .NET 8, AOT compilation of my Blazor WASM application fails with the following very long error message ([...] is a placeholder for the AOT'd DLL paths):

WasmApp.Native.targets(418,7): Error MSB3073 : The command "llvm-size.exe -d --format=sysv [...] exited with code 9020.

This occurs after the assemblies themselves are AOt'd, following the "Compiling assembly bitcode files with -O2 ..." process.
I am running Windows 10.

The area in the WasmApp.Native.targets file is as follows: interestingly, my IDE says that the 'ConsoleToMsBuild' attribute is not allowed here, and highlights it as an error, I am not sure if this is a red herring:

<!-- for AOT builds we use llvm-size tool to collect size of the DATA segment in each object file -->
      <Exec Command="llvm-size$(_ExeExt) -d --format=sysv @(_AOTObjectFile, ' ')"
          Condition="'$(_WasmShouldAOT)' == 'true'"
          IgnoreStandardErrorWarningFormat="true"
          ConsoleToMsBuild="true"
          StandardOutputImportance="low" StandardErrorImportance="low"
          EnvironmentVariables="@(EmscriptenEnvVars)" >

My .csproj file has the following blazor-related properties:

  <PropertyGroup>
    <TargetFramework>net8.0</TargetFramework>
    <RunAOTCompilation>true</RunAOTCompilation>
    <BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
    <BlazorEnableTimeZoneSupport>true</BlazorEnableTimeZoneSupport>
    <Nullable>disable</Nullable>
  </PropertyGroup>

The AOT process previously worked on .NET 7.

Expected Behavior

The AOT compilation process should execute as per .NET 7.

Steps To Reproduce

I have been unable to reproduce on a fresh .NET 8 project so far.

Exceptions (if any)

WasmApp.Native.targets(418,7): Error MSB3073 : The command "llvm-size.exe -d --format=sysv [...] exited with code 9020.

.NET Version

8.0.100

Anything else?

I am invoking the publish process from the command line to an IIS folder on my local machine.
My IDE is Rider 2023.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    arch-wasmWebAssembly architecturearea-Build-mononeeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsideration

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions