Skip to content

Commit

Permalink
Merge pull request #39 from bbredesen/bugfix/37
Browse files Browse the repository at this point in the history
Block enum from using build tags
  • Loading branch information
bbredesen committed Mar 28, 2023
2 parents b993c7f + e5f91a9 commit f7dcceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var (
func init() {
flag.StringVar(&inFileName, "inFile", "vk.xml", "Vulkan XML registry file to read")
flag.StringVar(&outDirName, "outDir", "vk", "Directory to write go-vk output to")
flag.StringVar(&platformTargets, "platform", "win32", "Comma-separated list of platforms to generate for")
flag.StringVar(&platformTargets, "platform", "win32,macos,metal", "Comma-separated list of platforms to generate for; this looks at the Vulkan name, not the GOOS name for the platform")

flag.Parse()

Expand Down Expand Up @@ -209,7 +209,7 @@ func printCategory(tc def.TypeCategory, fc *feat.Feature, platform *feat.Platfor
f, _ := os.Create(outpath)
// explicit f.Close() below; not deferred because the file must be written to disk before goimports is run

if platform != nil && platform.GoBuildTag != "" {
if platform != nil && platform.GoBuildTag != "" && tc != def.CatEnum {
fmt.Fprintf(f, "//go:build %s\n", platform.GoBuildTag)
}

Expand Down

0 comments on commit f7dcceb

Please sign in to comment.