msbuild icon indicating copy to clipboard operation
msbuild copied to clipboard

ngen arm64 binaries as arm64

Open benvillalobos opened this issue 1 year ago • 4 comments

Fixes an issue we've had with our arm64 MSBuild binaries not being ngen'd for arm64.

Notes

This brought up a question, how does ngen work cross-platform? Our msbuild binaries mostly reference what's in bin/, but if we're on an arm64 machine and we reference what's in bin/, don't those need to be ngen'd for arm64?

benvillalobos avatar Sep 15 '22 18:09 benvillalobos

We're supposed to have arm64 bits on non-arm machines too, right? So then would this mean they wouldn't be ngen'd for that scenario? Is the decision here that arm64 bits are most important on arm machines, so if there's a VS setup issue, we should prioritize arm-on-arm for now?

Forgind avatar Sep 15 '22 20:09 Forgind

isn't ngen deprecated? PublishAot with OutputType=Library (default) gets you native share lib on windows, linux and mac. some os/architectures don't support aot, there fallback to PublishReadyToRun for libraries and PublishSingleFile for executable.

kasperk81 avatar Sep 18 '22 06:09 kasperk81

isn't ngen deprecated?

ngen is the best JIT-reduction/AOT technology available on .NET Framework 4.8, which is relevant to MSBuild because it's what Visual Studio, one of our major partners, uses.

In the .NET SDK on .NET 6/7, we use the newer crossgen approach.

rainersigwald avatar Sep 19 '22 13:09 rainersigwald

Testing this here: https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=6707696&view=results if it gets to the VS PR stage with no issues then we can merge this

benvillalobos avatar Sep 19 '22 18:09 benvillalobos

@BenVillalobos, looks like you hit a missing optprof data issue. You presumably have to retarget where you're getting your data from the same way we did for main.

Forgind avatar Sep 26 '22 03:09 Forgind

I kicked off a separate pipeline build with the right data, but didn't notice the release failed. Kicked another one and that seems to be moving forward: https://dev.azure.com/devdiv/DevDiv/_releaseProgress?_a=release-pipeline-progress&releaseId=1395478

benvillalobos avatar Sep 29 '22 15:09 benvillalobos

Relevant PR: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/426628

benvillalobos avatar Sep 29 '22 16:09 benvillalobos

Passed RPS, this should be good to go.

benvillalobos avatar Oct 03 '22 14:10 benvillalobos