Check CPU support before building (#331)

* check cpu support before building

* build for x86-64-v2 on windows and intel macs
This commit is contained in:
patchzyy
2026-10-21 23:47:08 +02:00
committed by GitHub
parent e1157b26a0
commit 6a1fa79bf6
9 changed files with 200 additions and 6 deletions
@@ -64,6 +64,8 @@ internal static class Program
if (command.Mode is AppMode.SilentInstall or AppMode.RepairProducts)
{
// CPUs without x86-64-v3 get an x86-64-v2 build.
HostCpuRequirement.EnsureSupported(X86CpuProfile.V2);
using var cancellationSignal = CancellationSignal.ObserveEnvironment();
return command.Mode == AppMode.SilentInstall
? ConsoleCommands.Install(command, cancellationSignal.Token).GetAwaiter().GetResult()