Browse Source

windows: add "generate" build tag

cmd/go supports the "generate" build tag as of CL 175983. Add it to the
files which are just used for generating errors and syscall wrappers.

Also see golang/go#31920

Change-Id: Ib26c90af0ac1fb7bae81366a46dedf028b787566
Reviewed-on: https://go-review.googlesource.com/c/sys/+/175899
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Tobias Klauser 6 years ago
parent
commit
a5b02f93d8
3 changed files with 6 additions and 0 deletions
  1. 2 0
      windows/mkerrors.go
  2. 2 0
      windows/mksyscall.go
  3. 2 0
      windows/registry/mksyscall.go

+ 2 - 0
windows/mkerrors.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build generate
+
 package windows
 
 //go:generate ./mkerrors.bash zerrors_windows.go

+ 2 - 0
windows/mksyscall.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build generate
+
 package windows
 
 //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go

+ 2 - 0
windows/registry/mksyscall.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build generate
+
 package registry
 
 //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go