Skip to content

Commit

Permalink
Block enum from using build tags, add mac to flags
Browse files Browse the repository at this point in the history
  • Loading branch information
bbredesen committed Mar 28, 2023
1 parent bc31f5f commit e5f91a9
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 @@ -30,7 +30,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 @@ -201,7 +201,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 e5f91a9

Please sign in to comment.