Skip to content

Commit b8d50dc

Browse files
authored
Merge pull request #4938 from bk2204/tidy-trimpath
Makefile: remove legacy trimpath code
2 parents b698a64 + 7809d68 commit b8d50dc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Makefile

+2-9
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,12 @@ endif
3939
LD_FLAGS = $(BUILTIN_LD_FLAGS) $(EXTRA_LD_FLAGS)
4040

4141
# BUILTIN_GC_FLAGS are the internal flags used to pass compiler.
42-
BUILTIN_GC_FLAGS ?= all=-trimpath="$$HOME"
42+
BUILTIN_GC_FLAGS =
4343
# EXTRA_GC_FLAGS are the caller-provided flags to pass to the compiler.
4444
EXTRA_GC_FLAGS =
4545
# GC_FLAGS are the union of the above two BUILTIN_GC_FLAGS and EXTRA_GC_FLAGS.
4646
GC_FLAGS = $(BUILTIN_GC_FLAGS) $(EXTRA_GC_FLAGS)
4747

48-
ASM_FLAGS ?= all=-trimpath="$$HOME"
49-
50-
# TRIMPATH contains arguments to be passed to go to strip paths on Go 1.13 and
51-
# newer.
52-
TRIMPATH ?= $(shell [ "$$($(GO) version | awk '{print $$3}' | sed -e 's/^[^.]*\.//;s/\..*$$//;')" -ge 13 ] && echo -trimpath)
53-
5448
# RONN is the name of the 'ronn' program used to generate man pages.
5549
RONN ?= ronn
5650
# RONN_EXTRA_ARGS are extra arguments given to the $(RONN) program when invoked.
@@ -185,8 +179,7 @@ BUILD = GOOS=$(1) GOARCH=$(2) \
185179
$(GO) build \
186180
-ldflags="$(LD_FLAGS)" \
187181
-gcflags="$(GC_FLAGS)" \
188-
-asmflags="$(ASM_FLAGS)" \
189-
$(TRIMPATH) \
182+
-trimpath \
190183
-o ./bin/git-lfs$(3) $(BUILD_MAIN)
191184

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

0 commit comments

Comments
 (0)