Build libc++ ourselves

This commit is contained in:
topjohnwu 2021-03-25 01:00:10 -07:00
parent 0298ab99c4
commit 66e30a7723
6 changed files with 9 additions and 1 deletions

3
.gitmodules vendored
View File

@ -28,6 +28,9 @@
[submodule "xhook"]
path = native/jni/external/xhook
url = https://github.com/iqiyi/xHook.git
[submodule "libcxx"]
path = native/jni/external/libcxx
url = https://github.com/topjohnwu/libcxx.git
[submodule "termux-elf-cleaner"]
path = tools/termux-elf-cleaner
url = https://github.com/termux/termux-elf-cleaner.git

View File

@ -3,7 +3,7 @@ APP_CFLAGS := -Wall -Oz -fomit-frame-pointer -flto \
-D__MVSTR=${MAGISK_VERSION} -D__MCODE=${MAGISK_VER_CODE}
APP_LDFLAGS := -flto
APP_CPPFLAGS := -std=c++17
APP_STL := c++_static
APP_STL := none
APP_PLATFORM := android-16
ifdef MAGISK_DEBUG

View File

@ -374,3 +374,4 @@ include $(BUILD_STATIC_LIBRARY)
CWD := $(LOCAL_PATH)
include $(CWD)/systemproperties/Android.mk
include $(CWD)/mincrypt/Android.mk
include $(CWD)/libcxx/Android.mk

1
native/jni/external/libcxx vendored Submodule

@ -0,0 +1 @@
Subproject commit cca5298bc3fbb19b607008925b10acd0ee06e03d

View File

@ -4,6 +4,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE:= libsystemproperties
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
LOCAL_STATIC_LIBRARIES := libcxx
LOCAL_SRC_FILES := \
context_node.cpp \
contexts_serialized.cpp \

View File

@ -4,6 +4,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE:= libutils
LOCAL_C_INCLUDES := jni/include $(LOCAL_PATH)/include
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_EXPORT_STATIC_LIBRARIES := libcxx
LOCAL_STATIC_LIBRARIES := libcxx
LOCAL_SRC_FILES := \
missing.cpp \
new.cpp \