mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-08 03:11:34 -08:00
Make it easy to build without crt0
This commit is contained in:
@@ -59,13 +59,9 @@ endif
|
||||
|
||||
ifdef B_INIT
|
||||
|
||||
# -lc -lm is hardcoded in this variable, disable it
|
||||
TARGET_LDLIBS :=
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := magiskinit
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
crt0 \
|
||||
libbase \
|
||||
libpolicy \
|
||||
libxz \
|
||||
@@ -80,6 +76,14 @@ LOCAL_SRC_FILES := \
|
||||
init/selinux.cpp \
|
||||
init/init-rs.cpp
|
||||
|
||||
LOCAL_LDFLAGS := -static
|
||||
|
||||
ifdef B_CRT0
|
||||
# -lc -lm is hardcoded in this variable, disable it
|
||||
TARGET_LDLIBS :=
|
||||
LOCAL_STATIC_LIBRARIES += crt0
|
||||
endif
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user