x/mobile/cmd/gomobile: CGO_CFLAGS is overwritten during go bind -target=ios #12929
Comments
It would be nice to be able to set these flags when using gomobile. It's an odd middle-ground however: we deliberately ignore some variables like GOOS, GOARCH, CC, and CXX, but we will use the flags variables? And we will apply the same CC flags to different compilers? |
I think it is better to have a flag variable to determine whether we want to inherit CFO_CFLAGS and CGO_LDFLAGS from env. It should be caller's call to deal with different compilers. |
With https://go-review.googlesource.com/99316 in it is now possible to generate complete bindings with the gobind tool, skip gomobile and build the JNI lbraries manually with |
hi,
I faced an issue when I run gomobile bind with CGO_CFLAGS and CGO_LDFLAGS like
but output told me that there a header file not found.
It turns out when we build ios, the CGO_CFLAGS and CGO_LDFLAGS are overwritten.
https://github.com/golang/mobile/blob/master/cmd/gomobile/env.go#L132
I have a way to workaround this:
let me know if you think this is an issue.
The text was updated successfully, but these errors were encountered: