1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Add link flags in order to link statically and without debug symbols

This commit is contained in:
Guillaume J. Charmes 2013-06-03 13:18:44 -07:00
parent d8f56352da
commit c5be64fec4
2 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ endif
GIT_COMMIT = $(shell git rev-parse --short HEAD) GIT_COMMIT = $(shell git rev-parse --short HEAD)
GIT_STATUS = $(shell test -n "`git status --porcelain`" && echo "+CHANGES") GIT_STATUS = $(shell test -n "`git status --porcelain`" && echo "+CHANGES")
BUILD_OPTIONS = -ldflags "-X main.GITCOMMIT $(GIT_COMMIT)$(GIT_STATUS)" BUILD_OPTIONS = -ldflags "-X main.GITCOMMIT $(GIT_COMMIT)$(GIT_STATUS) -d -w"
SRC_DIR := $(GOPATH)/src SRC_DIR := $(GOPATH)/src
@ -33,7 +33,7 @@ all: $(DOCKER_BIN)
$(DOCKER_BIN): $(DOCKER_DIR) $(DOCKER_BIN): $(DOCKER_DIR)
@mkdir -p $(dir $@) @mkdir -p $(dir $@)
@(cd $(DOCKER_MAIN); go build $(GO_OPTIONS) $(BUILD_OPTIONS) -o $@) @(cd $(DOCKER_MAIN); CGO_ENABLED=0 go build $(GO_OPTIONS) $(BUILD_OPTIONS) -o $@)
@echo $(DOCKER_BIN_RELATIVE) is created. @echo $(DOCKER_BIN_RELATIVE) is created.
$(DOCKER_DIR): $(DOCKER_DIR):

View file

@ -15,7 +15,7 @@ VERSION=$(shell sed -En '0,/^\#\# /{s/^\#\# ([^ ]+).+/\1/p}' ../../CHANGELOG.md)
all: all:
# Compile docker. Used by dpkg-buildpackage. # Compile docker. Used by dpkg-buildpackage.
cd src/${GITHUB_PATH}/docker; GOPATH=${CURDIR} go build cd src/${GITHUB_PATH}/docker; GOPATH=${CURDIR} CGO_ENABLED=0 go build -ldflags '-d -w'
install: install:
# Used by dpkg-buildpackage # Used by dpkg-buildpackage