From 9e270bacf79a147416e0f94540b73d6761561dfb Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 13 Jun 2021 01:44:52 +0300 Subject: [PATCH] v.pref: do not panic in get_host_arch, assume Arch.amd64 as a default --- vlib/v/pref/pref.v | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/v/pref/pref.v b/vlib/v/pref/pref.v index f73c1479fa..9d75a9e05d 100644 --- a/vlib/v/pref/pref.v +++ b/vlib/v/pref/pref.v @@ -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) }