Skip to content

Commit

Permalink
Build libc++ ourselves
Browse files Browse the repository at this point in the history
  • Loading branch information
topjohnwu committed Mar 25, 2021
1 parent 0298ab9 commit 66e30a7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -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
2 changes: 1 addition & 1 deletion native/jni/Application.mk
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions native/jni/external/Android.mk
Expand Up @@ -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 change: 1 addition & 0 deletions native/jni/external/libcxx
Submodule libcxx added at cca529
1 change: 1 addition & 0 deletions native/jni/external/systemproperties/Android.mk
Expand Up @@ -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 \
Expand Down
2 changes: 2 additions & 0 deletions native/jni/utils/Android.mk
Expand Up @@ -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 \
Expand Down

0 comments on commit 66e30a7

Please sign in to comment.