λ ~/go/src/golang.org/x/mobile (master): git diff -pdiff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.goindex dbf9c8c..8f21b10 100644--- a/cmd/gomobile/env.go+++ b/cmd/gomobile/env.go@@ -23,7 +23,8 @@ var ( androidArmNM string darwinArmNM string - allArchs = []string{"arm", "arm64", "386", "amd64"}+ // allArchs = []string{"arm", "arm64", "386", "amd64"}+ allArchs = []string{"arm", "arm64", "amd64"} ) func buildEnvInit() (cleanup func(), err error) {@@ -137,7 +138,7 @@ func envInit() (err error) { default: panic(fmt.Errorf("unknown GOARCH: %q", arch)) }- cflags += " -fembed-bitcode"+ // cflags += " -fembed-bitcode" if err != nil { return err }$ gomobile bind -target=ios/arm,ios/arm64,ios/amd64 -nobitcode example.com/libs/mobile$ gomobile bind --helpBy default, -target=android builds shared libraries for all supportedinstruction sets (arm, arm64, 386, amd64). A subset of instruction setscan be selected by specifying target type with the architecture name. E.g.,-target=android/arm,android/386.For -target ios, gomobile must be run on an OS X machine with Xcodeinstalled. The generated Objective-C types can be prefixed with the -prefixflag.
GO111MODULE=off gomobile bind -v -target=ios/arm,ios/arm64,ios/amd64 -tags=ios example.com/mobileruntime/cgoos/usernetexample.com/jscoreld: warning: ignoring file pycore/libpython-scriptengine.a, file was built for archive which is not the architecture being linked (armv7): pycore/libpython-scriptengine.ald: warning: object file (/Users/tristian/go/src/example.com/pycore/libpython-scriptengine-ios.a(python-scriptengine-ios.o)) was built for newer iOS version (9.3) than being linked (7.0)ld: '/Users/tristian/go/src/example.com/pycore/libpython-scriptengine-ios.a(python-scriptengine-ios.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7clang: error: linker command failed with exit code 1 (use -v to see invocation)ld: warning: ignoring file jscore/libscriptengine-ios-x86_64.a, file was built for archive which is not the architecture being linked (armv7): jscore/libscriptengine-ios-x86_64.ald: warning: object file (/Users/tristian/go/src/example.com/jscore/libscriptengine-ios-arm.a(test_lib_for_ios.o)) was built for newer iOS version (10.2) than being linked (7.0)ld: '/Users/tristian/go/src/example.com/jscore/libscriptengine-ios-arm.a(test_lib_for_ios.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7clang: error: linker command failed with exit code 1 (use -v to see invocation)gomobile: darwin-arm: go build -tags ios ios -v -buildmode=c-archive -o /var/folders/g1/v3hz1sm92nv7wbzpg3dx_h_h0000gp/T/gomobile-work-974051835/mobile-arm.a gobind failed: exit status 2
make: *** [Mobile.framework] Error 1ld: '/mygo/src/mygomobileios/gomobileios_test/Mygomobileios.framework/Mygomobileios(go.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
brew install go --HEAD