dotnet/runtime

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

Open

#103,136 建立於 2024年6月6日

在 GitHub 查看
 (1 留言) (1 反應) (0 負責人)C# (5,445 fork)batch import
area-Codegen-AOT-monoenhancementhelp wantedwishlist

倉庫指標

Star
 (17,886 star)
PR 合併指標
 (平均合併 12天 11小時) (30 天內合併 661 個 PR)

描述

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.

貢獻者指南