Hi!

First, gomobile has been a real life saver thank you to all of those who 
have contributed.

The current commit at master (167ebed0ec6dd457a6b24a4f61db913f0af11f70) 
automatically adds the "-fembed-bitcode" flag to the cflags and 
it also automatically builds for all of iOS architectures.

We currently use `gomobile` to produce a framework for iOS and macOS 
applications. We also include applications for macOS that do not include 
support for instruction sets such as `386` but iOS does, some of those 
libraries we have no control over and some are our own.

Our current workaround is for us to manually patch `gomobile`'s source, 
like follows:

 λ ~/go/src/golang.org/x/mobile (master): git diff -p
diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go
index 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
                }

I think that the addition of the following options would greatly simplify 
our CI/CD process, the goal would be to be able to use the command as 
follows:

$ gomobile bind -target=ios/arm,ios/arm64,ios/amd64 -nobitcode 
example.com/libs/mobile

By running it that way basically one would be able to exclude iOS simulator 
arch and the bitcode situation. I understand that probably it may not be 
something common, but being able to adjust the build process would be a 
great boon.

Does anyone else find that this would be something useful?, I'd be happy to 
contribute to this.

Cheers, Tristian.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to