Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ jobs:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
cd core
export ANDROID_TARGET=${{ matrix.rust_target }}; make loadable
export ANDROID_TARGET=${{ matrix.rust_target }}; make SHARED_CFLAGS="-Wl,-z,max-page-size=16384" loadable
cd dist; zip crsqlite.zip ${{ matrix.library_name }}

- name: Upload binaries to release
Expand Down
7 changes: 6 additions & 1 deletion core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ endif

# SHARED_CFLAGS=-DLIBSQL=1
PIC_CFLAG=-fPIC
LOADABLE_CFLAGS=-std=c99 $(PIC_CFLAG) -shared -Wall $(SHARED_CFLAGS)
LOADABLE_CFLAGS=-std=c99 $(PIC_CFLAG) $(APPLE_LDFLAGS) -shared -Wall $(SHARED_CFLAGS)
STATIC_CFLAGS=-std=c99 $(PIC_CFLAG) -c -Wall $(SHARED_CFLAGS)
# libsql_feature=,libsql

Expand All @@ -20,6 +20,9 @@ endif

ifdef CONFIG_DARWIN
LOADABLE_EXTENSION=dylib
# Consumers that relocate the dylib rewrite its install name, which needs spare
# room in the header. install_name_tool fails on long paths without this.
APPLE_LDFLAGS=-headerpad_max_install_names
# apparently `darwin-x86_64` also works on arm macs and is the proper host arch for ndk builds.
NDK_HOSTARCH=darwin-x86_64
endif
Expand Down Expand Up @@ -66,6 +69,8 @@ endif
ifdef ANDROID_TARGET
CI_MAYBE_TARGET=$(ANDROID_TARGET)
NDK=$(ANDROID_NDK_HOME)
# Building for android from a mac host, the linker is the NDK's, not Apple's.
APPLE_LDFLAGS=
LOADABLE_EXTENSION=so
CC=$(NDK)/toolchains/llvm/prebuilt/$(NDK_HOSTARCH)/bin/clang
rs_ndk=ndk -t $(ANDROID_TARGET)
Expand Down
Loading