Skip to content

Commit

Permalink
build binary with static link flags (#14)
Browse files Browse the repository at this point in the history
staticklink parameter in COSMOS_BUILD_OPTIONS
  • Loading branch information
valli0x authored Nov 19, 2024
1 parent d2b350a commit ab5f064
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ endif
ldflags += $(LDFLAGS)
ldflags := $(strip $(ldflags))

ifeq (staticlink,$(findstring staticlink,$(COSMOS_BUILD_OPTIONS)))
ldflags += -linkmode external -extldflags '-static'
endif

build_tags += $(BUILD_TAGS)
build_tags := $(strip $(build_tags))

Expand Down

0 comments on commit ab5f064

Please sign in to comment.