]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: disable aeshash on NaCl at compile time
authorShenghou Ma <minux@golang.org>
Wed, 6 Aug 2014 04:24:11 +0000 (00:24 -0400)
committerShenghou Ma <minux@golang.org>
Wed, 6 Aug 2014 04:24:11 +0000 (00:24 -0400)
Fixes build for nacl/386.

LGTM=dave
R=khr, bradfitz, dave, dan.kortschak, rsc
CC=golang-codereviews
https://golang.org/cl/121080043

src/pkg/runtime/alg.go

index 9d06197f27d1b869b61b67543059fad67336ed7f..000d4a18b746cccb21924beb29fcaaca323d9e3a 100644 (file)
@@ -37,13 +37,15 @@ const (
        alg_max
 )
 
+const nacl = GOOS == "nacl"
+
 var use_aeshash bool
 
 // in asm_*.s
 func aeshash(p unsafe.Pointer, s uintptr, h uintptr) uintptr
 
 func memhash(p unsafe.Pointer, s uintptr, h uintptr) uintptr {
-       if use_aeshash {
+       if !nacl && use_aeshash {
                return aeshash(p, s, h)
        }