Skip to content

Commit

Permalink
Merge pull request #4938 from bk2204/tidy-trimpath
Browse files Browse the repository at this point in the history
Makefile: remove legacy trimpath code
  • Loading branch information
bk2204 authored Apr 12, 2022
2 parents b698a64 + 7809d68 commit b8d50dc
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,12 @@ endif
LD_FLAGS = $(BUILTIN_LD_FLAGS) $(EXTRA_LD_FLAGS)

# BUILTIN_GC_FLAGS are the internal flags used to pass compiler.
BUILTIN_GC_FLAGS ?= all=-trimpath="$$HOME"
BUILTIN_GC_FLAGS =
# EXTRA_GC_FLAGS are the caller-provided flags to pass to the compiler.
EXTRA_GC_FLAGS =
# GC_FLAGS are the union of the above two BUILTIN_GC_FLAGS and EXTRA_GC_FLAGS.
GC_FLAGS = $(BUILTIN_GC_FLAGS) $(EXTRA_GC_FLAGS)

ASM_FLAGS ?= all=-trimpath="$$HOME"

# TRIMPATH contains arguments to be passed to go to strip paths on Go 1.13 and
# newer.
TRIMPATH ?= $(shell [ "$$($(GO) version | awk '{print $$3}' | sed -e 's/^[^.]*\.//;s/\..*$$//;')" -ge 13 ] && echo -trimpath)

# RONN is the name of the 'ronn' program used to generate man pages.
RONN ?= ronn
# RONN_EXTRA_ARGS are extra arguments given to the $(RONN) program when invoked.
Expand Down Expand Up @@ -185,8 +179,7 @@ BUILD = GOOS=$(1) GOARCH=$(2) \
$(GO) build \
-ldflags="$(LD_FLAGS)" \
-gcflags="$(GC_FLAGS)" \
-asmflags="$(ASM_FLAGS)" \
$(TRIMPATH) \
-trimpath \
-o ./bin/git-lfs$(3) $(BUILD_MAIN)

# BUILD_TARGETS is the set of all platforms and architectures that Git LFS is
Expand Down

0 comments on commit b8d50dc

Please sign in to comment.