From 24e7a6212fd320c0dcd3b9622ba0a17f667f29d7 Mon Sep 17 00:00:00 2001 From: "Hyang-Ah (Hana) Kim" Date: Sun, 13 Sep 2015 22:27:19 -0400 Subject: [PATCH] cmd/gomobile: use ARC when compiling generated objective-c files. Gobind -lang=objc generates code that assume use of ARC. Set -fobjc-arc to explicitly enable ARC. Change-Id: Ib0ec7b19773c112c01ed23cb00f1ec9d64946e6b Reviewed-on: https://go-review.googlesource.com/14544 Reviewed-by: David Crawshaw --- cmd/gomobile/bind_iosapp.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/gomobile/bind_iosapp.go b/cmd/gomobile/bind_iosapp.go index b905aec..12c2bba 100644 --- a/cmd/gomobile/bind_iosapp.go +++ b/cmd/gomobile/bind_iosapp.go @@ -118,6 +118,7 @@ func goIOSBindArchive(name, path string, env []string) (string, error) { "-I", ".", "-g", "-O2", "-o", obj, + "-fobjc-arc", // enable ARC "-c", "Go"+strings.Title(name)+".m", ) cmd.Args = append(cmd.Args, strings.Split(getenv(env, "CGO_CFLAGS"), " ")...)