Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F164859141
D21730.id62375.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D21730.id62375.diff
View Options
Index: Mk/Uses/go.mk
===================================================================
--- Mk/Uses/go.mk
+++ Mk/Uses/go.mk
@@ -44,7 +44,7 @@
# command
#
# GO_BUILDFLAGS
-# Additional build arguments to be passed to the `go install` command
+# Additional build arguments to be passed to the `go build` command
#
# GO_PORT
# The Go port to use. By default this is lang/go but can be set
@@ -62,6 +62,7 @@
.endif
# Settable variables
+
.if empty(GO_PKGNAME)
. if !empty(GH_SUBDIR)
GO_PKGNAME= ${GH_SUBDIR:S|^src/||}
@@ -72,18 +73,24 @@
. endif
.endif
GO_TARGET?= ${GO_PKGNAME}
+
GO_BUILDFLAGS+= -v -buildmode=exe
+.if !defined(WITH_DEBUG) && empty(GO_BUILDFLAGS:M-ldflags*)
+GO_BUILDFLAGS+= -ldflags=-s
+.endif
+
CGO_ENABLED?= 1
CGO_CFLAGS+= -I${LOCALBASE}/include
CGO_LDFLAGS+= -L${LOCALBASE}/lib
+
.if ${ARCH} == armv6 || ${ARCH} == armv7
GOARM?= ${ARCH:C/armv//}
.endif
# Read-only variables
+
GO_CMD= ${LOCALBASE}/bin/go
GO_WRKDIR_BIN= ${WRKDIR}/bin
-
GO_ENV+= CGO_ENABLED=${CGO_ENABLED} \
CGO_CFLAGS="${CGO_CFLAGS}" \
CGO_LDFLAGS="${CGO_LDFLAGS}" \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Aug 5, 8:39 AM (14 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36022436
Default Alt Text
D21730.id62375.diff (1 KB)
Attached To
Mode
D21730: Mk/Uses/go.mk: Omit symbol table and debug information by default
Attached
Detach File
Event Timeline
Log In to Comment