Skip to content

Commit

Permalink
fix(mobile): patch gomobile build import
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Louvigny committed Oct 15, 2018
1 parent 0ab93d2 commit cf0ad13
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .circleci/docker/gomobile-env-flag.diff
@@ -1,11 +1,11 @@
--- env.go
+++ env.go
@@ -130,7 +130,7 @@ func envInit() (err error) {
"CXX="+clang+"++",
"CGO_CFLAGS="+cflags+" -arch "+archClang(arch),
"CGO_CXXFLAGS="+cflags+" -arch "+archClang(arch),
- "CGO_LDFLAGS="+cflags+" -arch "+archClang(arch),
+ "CGO_LDFLAGS="+cflags+" -arch "+archClang(arch)+" "+os.Getenv("CGO_LDFLAGS"),
"CGO_ENABLED=1",
)
darwinEnv[arch] = env
"CXX="+clang+"++",
"CGO_CFLAGS="+cflags+" -arch "+archClang(arch),
"CGO_CXXFLAGS="+cflags+" -arch "+archClang(arch),
- "CGO_LDFLAGS="+cflags+" -arch "+archClang(arch),
+ "CGO_LDFLAGS="+cflags+" -arch "+archClang(arch)+" "+os.Getenv("CGO_LDFLAGS"),
"CGO_ENABLED=1",
)
darwinEnv[arch] = env
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -28,6 +28,7 @@ lint-editorconfig:
! -name '*.gen.graphql' \
! -name '*.generated.go' \
! -name '*.patch' \
! -name '*.diff' \
! -name '*.vim' \
! -name '.DS_Store' \
! -name '.generated' \
Expand Down
6 changes: 2 additions & 4 deletions client/react-native/gomobile/Makefile
Expand Up @@ -3,6 +3,7 @@ PWD := $(shell pwd)
CORE_PACKAGE := $(PWD)/../../../core
CORE_SOURCES := $(shell find $(CORE_PACKAGE) -type f -name "*.go") \
$(shell find . -type f -name "*.go")
BUILD_PATCH_PATH := $(PWD)/../../../.circleci/docker

GOPATH ?= $(HOME)/go

Expand All @@ -29,10 +30,7 @@ deps-osx:
.PHONY: deps
deps:
GO111MODULE=off go get golang.org/x/mobile/cmd/gomobile
cd $(GOPATH)/src/golang.org/x/mobile/cmd/gomobile \
&& (git remote add upstream git@github.com:sfroment/mobile || true) \
&& git fetch upstream \
&& (git cherry-pick af3c051e0603af005260579c432830164f68933b || true)
patch -N ~/go/src/golang.org/x/mobile/cmd/gomobile/env.go $(BUILD_PATCH_PATH)/gomobile-env-flag.diff || true
go install golang.org/x/mobile/cmd/gomobile
go get -v golang.org/x/mobile/cmd/gobind
gomobile init
Expand Down

0 comments on commit cf0ad13

Please sign in to comment.