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 <mzh@golangcn.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Meng Zhuo <mzh@golangcn.org>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
This commit is contained in:
Meng Zhuo
2022-07-07 12:35:22 +08:00
committed by Gopher Robot
parent 05e143d24a
commit 5a0f0661e0

12
cpu/cpu_other_riscv64.go Normal file
View File

@@ -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
}