Skip to content

Commit

Permalink
Link dependencies arising from CGO dynamically (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
ltrk2 authored Nov 13, 2024
1 parent a714d41 commit 0aeda32
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ REVISION ?= $(BRANCH)-$(COMMIT_SHORT_SHA)

LDFLAGS := -X go.opentelemetry.io/ebpf-profiler/vc.version=$(VERSION) \
-X go.opentelemetry.io/ebpf-profiler/vc.revision=$(REVISION) \
-X go.opentelemetry.io/ebpf-profiler/vc.buildTimestamp=$(BUILD_TIMESTAMP) \
-extldflags=-static
-X go.opentelemetry.io/ebpf-profiler/vc.buildTimestamp=$(BUILD_TIMESTAMP)

GO_TAGS := osusergo,netgo
EBPF_FLAGS :=
Expand Down Expand Up @@ -109,8 +108,8 @@ TEST_INTEGRATION_BINARY_DIRS := tracer processmanager/ebpf support

integration-test-binaries: generate ebpf
$(foreach test_name, $(TEST_INTEGRATION_BINARY_DIRS), \
(go test -ldflags='-extldflags=-static' -trimpath -c \
-tags $(GO_TAGS),static_build,integration \
(go test -trimpath -c \
-tags $(GO_TAGS),integration \
-o ./support/$(subst /,_,$(test_name)).test \
./$(test_name)) || exit ; \
)
Expand Down

0 comments on commit 0aeda32

Please sign in to comment.