From 5a0f0661e09d84ea03c398ac6f55547b0fac897e Mon Sep 17 00:00:00 2001 From: Meng Zhuo Date: Thu, 7 Jul 2022 12:35:22 +0800 Subject: [PATCH] cpu: support non-linux OS for riscv64 Fixes golang/go#53698 Change-Id: Ia954aed4445a47fb8f8a2c0b9869aa8c50f2de15 Reviewed-on: https://go-review.googlesource.com/c/sys/+/416394 Auto-Submit: Meng Zhuo Reviewed-by: Heschi Kreinick Run-TryBot: Meng Zhuo Reviewed-by: Benny Siegert Reviewed-by: Tobias Klauser TryBot-Result: Gopher Robot Reviewed-by: Joel Sing --- cpu/cpu_other_riscv64.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 cpu/cpu_other_riscv64.go diff --git a/cpu/cpu_other_riscv64.go b/cpu/cpu_other_riscv64.go new file mode 100644 index 00000000..dd10eb79 --- /dev/null +++ b/cpu/cpu_other_riscv64.go @@ -0,0 +1,12 @@ +// Copyright 2022 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !linux && riscv64 +// +build !linux,riscv64 + +package cpu + +func archInit() { + Initialized = true +}