/ go Public
cmd/go: packages that use cgo not cached when cross-compiling android .so file #29132
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Here is my build command (fast in go1.9.2), I used goroutines and waitgroup to make it build two android cpu arch in two processes to make it faster:
My computer os is mac os 10.13.6
My program use cgo and it have a lot of c source code (sqlite3,"github.com/mutecomm/go-sqlcipher")
During all step I will not delete/modify the result .so files.
before first time run in go1.11.2, i will use
rm -rf /Users/xxx/Library/Caches/go-build && rm -rf ./pkg && rm -rf ./binto clean all build cache.
before first time run in go1.9.2, i will use
rm -rf ./pkg && rm -rf ./binto clean all build cache.
after first time run and before second time run, I will not change any code.
after second time run and before third time run, I will change one comment in the main package.
build time with go1.11.2
build time with go1.9.2
What I have already tried
Looks like I have already did what i can do to make the build faster in the command line without read the actually build source code to find some hidden faster flag.
go install -buildmode=c-shared xxx, it will not faster.
My build script to cross build .a file (-buildmode=c-archive) to ios(darwin arm64) have the same problem.
My build script to cross build elf file to (linux,amd64) become faster in go1.11.2 than go1.9.2.
I guess the build cache part of cross build android/ios or (-buildmode=c-archive) or (-buildmode=c-shared) have been delete.
Currently, I have to stop upgrade to newer golang version forever if I want develop my android/ios app faster.
So My problem is What command line should I use, if I want faster corss build to android with go1.11.2?
The text was updated successfully, but these errors were encountered: