Skip to content

Commit e269a80

Browse files
Remove unused exports / sections in jni on x86_64.
This resolves a linkage error with x64 affecting Marshmallow and clang. It also makes the unexported symbols non-visible since they don't need to be - this reduces the size of the ppsspp_jni.so too. Unfortunately, it reduces the readability of stack traces.
1 parent 266ee63 commit e269a80

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

android/jni/Locals.mk

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ LOCAL_C_INCLUDES := \
1717

1818
LOCAL_STATIC_LIBRARIES := native libzip glslang
1919
LOCAL_LDLIBS := -lz -landroid -lGLESv2 -lOpenSLES -lEGL -ldl -llog -latomic
20+
ifneq ($(NDK_DEBUG),1)
21+
# Prettier stack traces are nice on other platforms.
22+
# Maybe we can switch to storing the pre-stripped builds at some point.
23+
ifeq ($(TARGET_ARCH_ABI),x86_64)
24+
LOCAL_LDFLAGS += -Wl,--gc-sections -Wl,--exclude-libs,ALL
25+
endif
26+
endif
2027

2128
# ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
2229
ifeq ($(findstring armeabi-v7a,$(TARGET_ARCH_ABI)),armeabi-v7a)

0 commit comments

Comments
 (0)