v.pref: do not panic in get_host_arch, assume Arch.amd64 as a default

pull/10444/head
Delyan Angelov 2021-06-13 01:44:52 +03:00
parent 6e41561124
commit 9e270bacf7
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 2 additions and 1 deletions

View File

@ -763,7 +763,8 @@ pub fn get_host_arch() Arch {
// need a comptime `$if native {` too, and/or a mechanism to always
// generate all branches for specific functions?
if C.__V_architecture <= int(Arch._auto) || C.__V_architecture >= int(Arch._max) {
panic('unknown host CPU architecture')
eprintln('unknown host CPU architecture')
return Arch.amd64
}
return Arch(C.__V_architecture)
}