mirror of
https://github.com/golang/sys.git
synced 2026-02-08 19:56:04 +03:00
cpu: define cacheLineSize and doinit for WASM
This fixes a build break when compiling this package with GOOS=js / GOARCH=wasm. Updates golang/go#30241 Change-Id: I0b35aa50a69370ed0d83c522e12ce7613c4c3ec4 Reviewed-on: https://go-review.googlesource.com/c/sys/+/165749 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
13
cpu/cpu_wasm.go
Normal file
13
cpu/cpu_wasm.go
Normal file
@@ -0,0 +1,13 @@
|
||||
// Copyright 2019 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.
|
||||
|
||||
package cpu
|
||||
|
||||
// We're compiling the cpu package for an unknown (software-abstracted) CPU.
|
||||
// Make CacheLinePad an empty struct and hope that the usual struct alignment
|
||||
// rules are good enough.
|
||||
|
||||
const cacheLineSize = 0
|
||||
|
||||
func doinit() {}
|
||||
Reference in New Issue
Block a user