Skip to content

Commit

Permalink
Run both commands inside the containers for each strip target: && .
Browse files Browse the repository at this point in the history
  • Loading branch information
afinetooth committed Sep 19, 2024
1 parent 9eac84d commit 2dd37ae
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ compile-aarch64:

.PHONY: strip-aarch64
strip-aarch64: $(BINARY_AARCH64)
#docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} strip $(BINARY_AARCH64)
docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} zig objcopy --strip-all $(BINARY_AARCH64) $(BINARY_AARCH64)-stripped
mv $(BINARY_AARCH64)-stripped $(BINARY_AARCH64)
docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} /bin/sh -c \
"zig objcopy --strip-all $(BINARY_AARCH64) $(BINARY_AARCH64)-stripped && \
mv $(BINARY_AARCH64)-stripped $(BINARY_AARCH64)"

.PHONY: strip-x86_64
strip-x86_64: $(BINARY_X86_64)
docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} zig objcopy --strip-all $(BINARY_X86_64) $(BINARY_X86_64)-stripped
mv $(BINARY_X86_64)-stripped $(BINARY_X86_64)
docker run --rm -v $(shell pwd):/app -w /app ${IMAGE_NAME}:${VERSION} /bin/sh -c \
"zig objcopy --strip-all $(BINARY_X86_64) $(BINARY_X86_64)-stripped && \
mv $(BINARY_X86_64)-stripped $(BINARY_X86_64)"

.PHONY: compile-and-strip-all
compile-and-strip-all: compile-aarch64 compile-x86_64 strip-aarch64 strip-x86_64
Expand Down

0 comments on commit 2dd37ae

Please sign in to comment.