Skip to content

Commit

Permalink
Fix race build option not supported issue in armhf (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
xumia authored and mssonicbld committed Jun 3, 2024
1 parent 5e39692 commit 314e4f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export GOPATH=$(HOME)/go
export GOBIN=$(GOPATH)/bin
export GO111MODULE=on
export GOFLAGS=-modcacherw
RACE_OPTION := -race
ifeq ($(CONFIGURED_ARCH),armhf)
RACE_OPTION :=
endif

all: install build

Expand All @@ -16,10 +20,10 @@ install: build
build: $(GOPATH)/bin/go-server-server $(GOPATH)/bin/go-server-server.test

$(GOPATH)/bin/go-server-server: libcswsscommon $(GOPATH)/src/go-server-server/main.go
cd $(GOPATH)/src/go-server-server && $(GO) get -v && $(GO) build -race -v
cd $(GOPATH)/src/go-server-server && $(GO) get -v && $(GO) build $(RACE_OPTION) -v

$(GOPATH)/bin/go-server-server.test: libcswsscommon $(GOPATH)/src/go-server-server/main.go
cd $(GOPATH)/src/go-server-server && $(GO) get -v && $(GO) test -race -c -covermode=atomic -coverpkg "go-server-server/go" -v -o $(GOPATH)/bin/go-server-server.test
cd $(GOPATH)/src/go-server-server && $(GO) get -v && $(GO) test $(RACE_OPTION) -c -covermode=atomic -coverpkg "go-server-server/go" -v -o $(GOPATH)/bin/go-server-server.test

$(GOPATH)/src/go-server-server/main.go:
mkdir -p $(GOPATH)/src
Expand Down
6 changes: 5 additions & 1 deletion mseethrifttest/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#FIXME: Create better rules
#FIXME: Check and write all dependencies

RACE_OPTION := -race
ifeq ($(CONFIGURED_ARCH),armhf)
RACE_OPTION :=
endif

.INTERMEDIATE: msee.thrift.intermediate

all: client

client: client.go ../mseethrift/msee.go
go build -race client.go
go build $(RACE_OPTION) client.go

msee/constants.go msee/msee.go msee/ttypes.go: msee.thrift.intermediate
go get "git.apache.org/thrift.git/lib/go/thrift"
Expand Down

0 comments on commit 314e4f6

Please sign in to comment.