Bug fix: Compile error for Wasm

This commit is contained in:
Hajime Hoshi 2020-10-07 02:20:04 +09:00
parent ee4ebaaa95
commit dc288d37f8
7 changed files with 13 additions and 0 deletions

View File

@ -706,6 +706,8 @@ func main() {
// Pass the build tag and extract this in the template to make `go vet` happy. // Pass the build tag and extract this in the template to make `go vet` happy.
buildTag := "" buildTag := ""
switch path { switch path {
case "internal/glfw/keys.go":
buildTag = "// +build !js"
case "internal/uidriver/glfw/keys.go": case "internal/uidriver/glfw/keys.go":
buildTag = "// +build darwin freebsd linux windows" + buildTag = "// +build darwin freebsd linux windows" +
"\n// +build !android" + "\n// +build !android" +

View File

@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// +build !js
package glfw package glfw
import ( import (

View File

@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// +bulid !js
//go:generate sh ./gen.sh //go:generate sh ./gen.sh
package glfw package glfw

View File

@ -13,6 +13,7 @@
// limitations under the License. // limitations under the License.
// +build !windows // +build !windows
// +build !js
package glfw package glfw

View File

@ -14,6 +14,8 @@
// Code generated by genkeys.go using 'go generate'. DO NOT EDIT. // Code generated by genkeys.go using 'go generate'. DO NOT EDIT.
// +build !js
package glfw package glfw
const ( const (

View File

@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// +build !js
package glfw package glfw
type ( type (

View File

@ -9,6 +9,8 @@
// This document is licensed under the SGI Free Software B License. // This document is licensed under the SGI Free Software B License.
// For details, see http://oss.sgi.com/projects/FreeB. // For details, see http://oss.sgi.com/projects/FreeB.
// +build !js
// Package gl implements Go bindings to OpenGL. // Package gl implements Go bindings to OpenGL.
package gl package gl