File: go_common_opts.mk

package info (click to toggle)
singularity-container 4.1.5%2Bds4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,876 kB
  • sloc: asm: 14,840; sh: 3,190; ansic: 1,751; awk: 414; makefile: 413; python: 99
file content (23 lines) | stat: -rw-r--r-- 814 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# go tool default build options
GO111MODULE := on
GO_TAGS := sylog singularity_engine fakeroot_engine
GO_TAGS_SUID := sylog singularity_engine fakeroot_engine
GO_LDFLAGS :=
# Need to use non-pie build on ppc64le
# https://github.com/hpcng/singularity/issues/5762
# Need to disable race detector on ppc64le
# https://github.com/hpcng/singularity/issues/5914
uname_m := $(shell uname -m)
ifeq ($(uname_m),$(filter $(uname_m),mips mips64 ppc64le i386 i686))
GO_BUILDMODE := -buildmode=default
GO_RACE :=
else
GO_BUILDMODE := -buildmode=pie
GO_RACE := -race
endif
GO_MODFLAGS := $(if $(wildcard $(SOURCEDIR)/vendor/modules.txt),-mod=vendor,-mod=readonly)
GO_MODFILES := $(SOURCEDIR)/go.mod $(SOURCEDIR)/go.sum
GOFLAGS := $(GO_MODFLAGS) -trimpath
GOPROXY := https://proxy.golang.org

export GOFLAGS GO111MODULE GOPROXY