mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 03:34:03 +00:00
ci: add ARCH variable to makefile, override it during cross-compilation
This commit is contained in:
parent
611195e4d3
commit
bc12957823
2 changed files with 4 additions and 3 deletions
2
.github/workflows/extensions.yml
vendored
2
.github/workflows/extensions.yml
vendored
|
|
@ -75,7 +75,7 @@ jobs:
|
||||||
export CC=/opt/homebrew/opt/llvm/bin/clang
|
export CC=/opt/homebrew/opt/llvm/bin/clang
|
||||||
export CFLAGS="-target x86_64-apple-darwin"
|
export CFLAGS="-target x86_64-apple-darwin"
|
||||||
export LDFLAGS="-target x86_64-apple-darwin"
|
export LDFLAGS="-target x86_64-apple-darwin"
|
||||||
make
|
make ARCH=x86_64
|
||||||
|
|
||||||
- name: Commit output files
|
- name: Commit output files
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,15 @@ ifeq ($(OS),Windows_NT)
|
||||||
else
|
else
|
||||||
UNAME := $(shell uname)
|
UNAME := $(shell uname)
|
||||||
CCFLAGS += -fPIC -Os -shared
|
CCFLAGS += -fPIC -Os -shared
|
||||||
|
ARCH := $(if $(ARCH),$(ARCH),$(shell uname -m))
|
||||||
ifeq ($(UNAME),Darwin)
|
ifeq ($(UNAME),Darwin)
|
||||||
ifeq ($(shell uname -m),arm64)
|
ifeq ($(ARCH),arm64)
|
||||||
OUTPUT = lib/arm/noattach.dylib
|
OUTPUT = lib/arm/noattach.dylib
|
||||||
else
|
else
|
||||||
OUTPUT = lib/noattach.dylib
|
OUTPUT = lib/noattach.dylib
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
ifeq ($(shell uname -m),aarch64)
|
ifeq ($(ARCH),aarch64)
|
||||||
OUTPUT = lib/arm/noattach.so
|
OUTPUT = lib/arm/noattach.so
|
||||||
else
|
else
|
||||||
OUTPUT = lib/noattach.so
|
OUTPUT = lib/noattach.so
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue