Skip to content

Commit 82fcacf

Browse files
committed
wit/bindgen: disable Cgo file generation for now
1 parent 1d5357a commit 82fcacf

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

wit/bindgen/generator.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,15 +2303,17 @@ func (g *generator) newPackage(w *wit.World, i *wit.Interface, name string) (*ge
23032303
// Component Model definition for a world that encapsulates the
23042304
// Component Model types and functions imported into and/or exported
23052305
// from this Go package.
2306-
cgoFile := g.cgoFileFor(owner)
2307-
lib := id.String()
2308-
if name != id.Extension {
2309-
lib += "-" + name
2306+
if false {
2307+
cgoFile := g.cgoFileFor(owner)
2308+
lib := id.String()
2309+
if name != id.Extension {
2310+
lib += "-" + name
2311+
}
2312+
lib = strings.ReplaceAll(lib, "/", "-")
2313+
lib = strings.ReplaceAll(lib, ":", "-")
2314+
stringio.Write(cgoFile, "// #cgo LDFLAGS: -L. -l", lib, "\n")
2315+
stringio.Write(cgoFile, "import \"C\"\n")
23102316
}
2311-
lib = strings.ReplaceAll(lib, "/", "-")
2312-
lib = strings.ReplaceAll(lib, ":", "-")
2313-
stringio.Write(cgoFile, "// #cgo LDFLAGS: -L. -l", lib, "\n")
2314-
stringio.Write(cgoFile, "import \"C\"\n")
23152317

23162318
return pkg, nil
23172319
}

0 commit comments

Comments
 (0)