dotnet/runtime

[mono][aot] Write a tool to collect mono-aot-cross inputs and rsp files from an msbuild binlog

Open

#103.136 geöffnet am 6. Juni 2024

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (0 zugewiesene Personen)C# (5.445 Forks)batch import
area-Codegen-AOT-monoenhancementhelp wantedwishlist

Repository-Metriken

Stars
 (17.886 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)

Beschreibung

It would be nice if mono-aot-cross had a companion tool like complog that could collect all AOT compiler invocations from a particular build and zip them up for easy issue repros.

Use case:

  • A developer experiences a crash in the mono aot compiler while building their ios/android/wasm app. They open a github issue.
  • A member of the .NET team asks the user to do dotnet build -bl to create an msbuild.binlog file and then run the mono-aot-cross-complog tool to find all the places in the msbuild log where the Mono AOT compiler is invoked, collect all the command line arguments, collect all the input assemblies, and put all that info into a zip file ready for uploading.
  • The developer checks that the zip file is ok to share and sends it to the .NET team member
  • The .NET team member can run mono-aot-cross under a debugger (or run a custom build of mono-aot-cross) with all the same inputs and command line arguments and investigate the issue.

Complications:

  1. mono-aot-cross needs not only assemblies that are direct inputs but also the contents of all directories specified in a MONO_PATH environment variable
  2. Mono AOT compiler has arguments for specifying toolchains, binaries for assemblers/native linkers/etc. We might need to capture those too, to get a fully reproducible build environment.

Contributor Guide