提交 392abbda 编写于 作者: D Derek Parker

Conditionally set ld flags in Makefile for Go version

Passing the '-s' flag to the linker in < Go 1.5 emits an error and
produces a binary that, once codesigned (I believe) will cause an
immediate bus error and terminate.
上级 e2d92a11
.DEFAULT_GOAL=test
UNAME = $(shell uname)
PREFIX=github.com/derekparker/delve
GOVERSION = $(shell go version)
# We must compile with -ldflags="-s" to omit
# DWARF info on OSX when compiling with the
# 1.5 toolchain. Otherwise the resulting binary
# will be malformed once we codesign it and
# unable to execute.
# See https://github.com/golang/go/issues/11887#issuecomment-126117692.
ifneq (,$(findstring 1.5, $(GOVERSION)))
FLAGS=-ldflags="-s"
endif
build:
go build $(FLAGS) github.com/derekparker/delve/cmd/dlv
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册