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>
diff --git a/cpu/cpu_wasm.go b/cpu/cpu_wasm.go
new file mode 100644
index 0000000..108d9e6
--- /dev/null
+++ b/cpu/cpu_wasm.go
@@ -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() {}