Closed lionello closed 1 year ago
Cosmetic suggestion: use the directory name as the dummy package name.
for d in $(find internal -type d); do echo "package $(basename $d)" >"$d/dummy.go"; done
Well, this doesn't fix the issue.
Here is what we get with go build
: C source files not allowed when not using cgo or SWIG
This works around https://github.com/golang/go/issues/26366 by adding a
dummy.go
file in required folders. Without this fix, all C and H files will be missing from the vendor folder, causing the build to fail.For another example, see https://github.com/Hywan/go-ext-wasm/commit/4724910709abd61d86be29dac079c85f660c3595