dotnet / BenchmarkDotNet

Powerful .NET library for benchmarking
https://benchmarkdotnet.org
MIT License
10.24k stars 952 forks source link

Fix Mono AOT LLVM #2539

Closed caaavik-msft closed 4 months ago

caaavik-msft commented 4 months ago

Similar to what broke with the WASM runs, it seems that Mono AOT LLVM also will always append the publish directory onto the end of the OutDir and OutputPath that we pass in, so we need to remove it from the end of those paths and then append it the executable path and working directory.

We are doing some more testing on this first before it can be ready to merge however, but this seems like the likely fix. Testing is done, this PR is ready for a merge.

caaavik-msft commented 4 months ago

I'm fixing a 2nd bug in this PR, if you specified a moniker monoaotllvmnet90 it was still using the non .NET specific MonoAOTLLVM moniker in the runtime and so the DotNetSdkValidator was failing.

timcassell commented 4 months ago

Do we need to account for MonoAOTLLVM and Wasm monikers in the sdk validator? And should we deprecate those?

caaavik-msft commented 4 months ago

I have created another issue for that: https://github.com/dotnet/BenchmarkDotNet/issues/2540

timcassell commented 4 months ago

It would also be nice to get integration tests for this (#2536).

timcassell commented 4 months ago

Thanks for the fix!