supranational / blst

Multilingual BLS12-381 signature library
Apache License 2.0
458 stars 175 forks source link

cgo file and .c .h with different directory may cause go build failed #158

Open lcmmhcc opened 1 year ago

lcmmhcc commented 1 year ago

according to https://github.com/golang/go/blob/master/src/cmd/cgo/doc.go#L109

including the cgo file and use go mod vendor is an easy way to reproduce it.

issues https://github.com/golang/go/issues/26366

tarakby commented 7 months ago

The cgo files in the go build are actually only https://github.com/supranational/blst/blob/master/bindings/go/cgo_assembly.S and https://github.com/supranational/blst/blob/master/bindings/go/cgo_server.c. All the source directory code is "copied" thanks to the include directive.