Skip to content

Commit

Permalink
ci: add ARCH variable to makefile, override it during cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl committed Jan 2, 2025
1 parent 611195e commit bc12957
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
export CC=/opt/homebrew/opt/llvm/bin/clang
export CFLAGS="-target x86_64-apple-darwin"
export LDFLAGS="-target x86_64-apple-darwin"
make
make ARCH=x86_64
- name: Commit output files
shell: bash
Expand Down
5 changes: 3 additions & 2 deletions extensions/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ ifeq ($(OS),Windows_NT)
else
UNAME := $(shell uname)
CCFLAGS += -fPIC -Os -shared
ARCH := $(if $(ARCH),$(ARCH),$(shell uname -m))
ifeq ($(UNAME),Darwin)
ifeq ($(shell uname -m),arm64)
ifeq ($(ARCH),arm64)
OUTPUT = lib/arm/noattach.dylib
else
OUTPUT = lib/noattach.dylib
endif
else
ifeq ($(shell uname -m),aarch64)
ifeq ($(ARCH),aarch64)
OUTPUT = lib/arm/noattach.so
else
OUTPUT = lib/noattach.so
Expand Down

0 comments on commit bc12957

Please sign in to comment.