Make it easy to build without crt0

This commit is contained in:
topjohnwu
2024-02-24 22:32:22 -08:00
parent 47e6dd286d
commit 365b373480
3 changed files with 11 additions and 7 deletions

View File

@@ -8,14 +8,13 @@ APP_PLATFORM := android-26
APP_THIN_ARCHIVE := true
APP_STRIP_MODE := none
# magiskinit uses crt0
ifdef B_INIT
ifdef B_CRT0
# Disable all security and debugging features
APP_CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-stack-protector -U_FORTIFY_SOURCE
APP_LDFLAGS += -Wl,-wrap,abort_message
# Override output folder to make sure all dependencies are rebuilt with new CFLAGS
NDK_APP_OUT := ./obj/init
NDK_APP_OUT := ./obj/nolibc
endif