Skip to content

Commit

Permalink
Build statically on Linux to avoid libc versioning issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwo committed Oct 10, 2022
1 parent ec314f5 commit ad9e50d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ jobs:
- "*.tar.gz"
- "*.sha256"

- store_artifacts:
path: dist/

lint:
parallelism: 1
environment:
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ define BUILD_FLAGS
-X github.com/filecoin-project/bacalhau/pkg/version.GOARCH=$(GOARCH)
endef

define STATIC_BUILD_FLAGS
-linkmode=external -extldflags '-static'
endef

ifeq (${GOOS},linux)
BUILD_FLAGS += ${STATIC_BUILD_FLAGS}
endif

# If we are cross-compiling, bring in the appropriate compilers
ifneq ($(GOOS)_$(GOARCH),$(OS)_$(ARCH))
compile/${OS}/$(GOOS)_$(GOARCH).env:
Expand Down

0 comments on commit ad9e50d

Please sign in to comment.