dotnet / jitutils

MIT License
144 stars 59 forks source link

Add option to enable Linux cross builds for jit-format. #379

Closed c272 closed 11 months ago

c272 commented 1 year ago

Currently, when jit-format attempts to build a fresh version of compile-commands.json on Linux, it will always attempt a cross build, regardless of whether this is accurate for the host system. This currently breaks our internal formatting CI, as there is no way to disable this with an option/configuration flag.

This patch adds an option to enable cross builds when on Linux, rather than defaulting to always building with -cross.

I think this will likely break the current .NET CI though, as viewing the prior patch which introduced this argument indicates this was a quick fix to unblock CI after it moved to using rootfs on Mariner, requiring -cross. If this patch is applied, --linux-cross would have to be passed.

a74nh commented 1 year ago

This bug is currently a little annoying as we (Arm) build everything on the target machines - we do no cross building at all. So, it's currently awkward to run the format checking test.

BruceForstall commented 12 months ago

@dotnet/jit-contrib

BruceForstall commented 11 months ago

I've written a fix that makes "--cross" a required parameter on platforms that need it (like is done here), and also fixed the CI system:

https://github.com/dotnet/jitutils/pull/380 https://github.com/dotnet/runtime/pull/92751

I'm going to close this in favor of those PRs.