Skip to content

Commit 70bdd7f

Browse files
committed
Add basic Android build using ndk-build
1 parent ac879d3 commit 70bdd7f

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

android/jni/Android.mk

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
LOCAL_PATH := $(call my-dir)
2+
include $(CLEAR_VARS)
3+
4+
APP_CFLAGS := -DTHREAD_SUPPORT=1 -pthread -DTHREAD_ZONE_CACHE=1 \
5+
-DPRE_POPULATE_PAGES=0 -DSMALL_MEM_STARTUP=0 -DSANITIZE_CHUNKS=0 \
6+
-DFUZZ_MODE=0 -DPERM_FREE_REALLOC=0 -DDISABLE_CANARY=0 -Werror \
7+
-pedantic -Wno-pointer-arith -Wno-gnu-zero-variadic-macro-arguments \
8+
-Wno-format-pedantic -DMALLOC_HOOK=1 -fvisibility=hidden -std=c11 \
9+
-DALLOC_SANITY=0 -DUNINIT_READ_SANITY=0 -DCPU_PIN=0 -DEXPERIMENTAL=0 \
10+
-DUAF_PTR_PAGE=0 -DVERIFY_BIT_SLOT_CACHE=0 -DNAMED_MAPPINGS=1 -fPIC \
11+
-DNAMED_MAPPING=1 -shared -DDEBUG=1 -DLEAK_DETECTOR=1 -DMEM_USAGE=1 \
12+
-g -ggdb3 -fno-omit-frame-pointer
13+
14+
LOCAL_SRC_FILES := ../../src/iso_alloc.c ../../src/iso_alloc_printf.c ../../src/iso_alloc_random.c \
15+
../../src/iso_alloc_search.c ../../src/iso_alloc_interfaces.c ../../src/iso_alloc_profiler.c \
16+
../../src/iso_alloc_sanity.c ../../src/malloc_hook.c
17+
18+
LOCAL_C_INCLUDES := ../../include/
19+
20+
LOCAL_MODULE := libisoalloc
21+
22+
include $(BUILD_SHARED_LIBRARY)

android/jni/Application.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
APP_ABI := arm64-v8a x86_64
2+
APP_PLATFORM := android-23

0 commit comments

Comments
 (0)