-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
This is not your fault (it is like this in the Go sources), but a positive list for the fallback is silly. Could you check if this works: // +build !amd64,!amd64p32 appengine gccgo If it does, let's change this line to this instead. |
Agreed. I wanted to do that too. I'll try what you suggested and confirm it works. |
Ok, I've tested that, and it works for
The total set of build tags used across all files is quite complex, and I'm not completely confident that every single scenario is covered correctly. But I'll update the PR. I've also cleaned up the style of build tags to be more idiomatic and consistent. |
Thanks for testing. At least with this change, we "only" have to exclude the known optimized functions, and white-list all non-optimized platforms. If you update the PR, I will merge it, and take the blame if it doesn't work :) |
I've updated, PTAL. |
// Copyright 2011 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. | ||
|
||
// +build !appengine,!gccgo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you moving these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more idiomatic Go style and consistent with how build constraints are done.
Compare with:
- https://github.com/golang/go/blob/go1.5.3/src/runtime/cputicks.go
- https://github.com/golang/go/blob/go1.5.3/src/runtime/cgo/gcc_signal_darwin_lldb.c
- https://github.com/golang/go/blob/go1.5.3/src/crypto/sha1/sha1block_generic.go
- https://github.com/golang/go/blob/go1.5.3/src/crypto/sha256/sha256block_decl.go
It's just a style change and should not have any effect. If you dislike it, I can remove this commit.
Instead of trying to include all remaining tags, use the negation of the rest of build constraints. Fixes gopherjs/gopherjs#378.
No problem. Thanks for the contribution! |
Fixes gopherjs/gopherjs#378. /cc @kaustavha
I've tested, and its
TestGolden
passes usinggopherjs
compiler after this change: