Skip to content

Commit 6a01363

Browse files
authored
Merge pull request #16644 from ligi/reduce_aar_size
build: Add ldflags "-s -w" when building aar
2 parents 5449139 + 58c4e03 commit 6a01363

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build/ci.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ func doAndroidArchive(cmdline []string) {
731731
// Build the Android archive and Maven resources
732732
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
733733
build.MustRun(gomobileTool("init", "--ndk", os.Getenv("ANDROID_NDK")))
734-
build.MustRun(gomobileTool("bind", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile"))
734+
build.MustRun(gomobileTool("bind", "-ldflags", "-s -w", "--target", "android", "--javapkg", "org.ethereum", "-v", "github.com/ethereum/go-ethereum/mobile"))
735735

736736
if *local {
737737
// If we're building locally, copy bundle to build dir and skip Maven
@@ -852,7 +852,7 @@ func doXCodeFramework(cmdline []string) {
852852
// Build the iOS XCode framework
853853
build.MustRun(goTool("get", "golang.org/x/mobile/cmd/gomobile", "golang.org/x/mobile/cmd/gobind"))
854854
build.MustRun(gomobileTool("init"))
855-
bind := gomobileTool("bind", "--target", "ios", "--tags", "ios", "-v", "github.com/ethereum/go-ethereum/mobile")
855+
bind := gomobileTool("bind", "-ldflags", "-s -w", "--target", "ios", "--tags", "ios", "-v", "github.com/ethereum/go-ethereum/mobile")
856856

857857
if *local {
858858
// If we're building locally, use the build folder and stop afterwards

0 commit comments

Comments
 (0)