mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 19:55:27 +02:00
Merge pull request #19658 from hrydgard/support-16kb-pages
Add support for 16kb page size on Android
This commit is contained in:
+9
-1
@@ -396,7 +396,7 @@ if(NOT MSVC)
|
||||
# This one is very useful but has many false positives.
|
||||
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wno-class-memaccess>")
|
||||
else()
|
||||
add_compile_options(-Wno-deprecated-declarations)
|
||||
add_compile_options(-Wno-deprecated-declarations -Wno-missing-braces)
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
@@ -2718,6 +2718,11 @@ set(WindowsFiles
|
||||
Windows/stdafx.h
|
||||
)
|
||||
|
||||
if(ANDROID AND ARM64)
|
||||
# Support 16kb page size on Android
|
||||
target_link_options(${CoreLibName} PRIVATE "-Wl,-z,max-page-size=16384")
|
||||
endif()
|
||||
|
||||
list(APPEND LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(WIN32)
|
||||
@@ -2904,6 +2909,9 @@ if(TargetBin)
|
||||
else()
|
||||
add_executable(${TargetBin} ${NativeAppSource})
|
||||
endif()
|
||||
if(ANDROID AND ARM64)
|
||||
target_link_options(${TargetBin} PRIVATE "-Wl,-z,max-page-size=16384")
|
||||
endif()
|
||||
target_link_libraries(${TargetBin} ${LinkCommon} Common)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ void LogManager::LogLine(LogLevel level, Log type, const char *file, int line, c
|
||||
const char *hostThreadName = GetCurrentThreadName();
|
||||
if ((hostThreadName && strcmp(hostThreadName, "EmuThread") != 0) || !hleCurrentThreadName) {
|
||||
// Use the host thread name.
|
||||
threadName = hostThreadName;
|
||||
threadName = hostThreadName ? hostThreadName : "unknown";
|
||||
} else {
|
||||
// Use the PSP HLE thread name.
|
||||
threadName = hleCurrentThreadName;
|
||||
|
||||
@@ -352,7 +352,12 @@ int GetMemoryProtectPageSize() {
|
||||
if (sys_info.dwPageSize == 0)
|
||||
GetSystemInfo(&sys_info);
|
||||
return sys_info.dwPageSize;
|
||||
#else
|
||||
static int pageSize = 0;
|
||||
if (!pageSize) {
|
||||
pageSize = sysconf(_SC_PAGE_SIZE);
|
||||
}
|
||||
return pageSize;
|
||||
#endif
|
||||
return MEM_PAGE_SIZE;
|
||||
}
|
||||
#endif // !PPSSPP_PLATFORM(SWITCH)
|
||||
|
||||
+20
-8
@@ -18,7 +18,7 @@ dependencies {
|
||||
|
||||
// Convenient wrapper around DocumentContract. Might look into writing our own
|
||||
// to see if there's some performance to squeeze at some point, but doubt it.
|
||||
implementation "androidx.documentfile:documentfile:1.0.1"
|
||||
implementation "androidx.documentfile:documentfile:1.1.0"
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -47,7 +47,14 @@ android {
|
||||
}
|
||||
|
||||
compileSdk 35
|
||||
ndkVersion "21.4.7075529"
|
||||
|
||||
ndkVersion "27.2.12479018"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
/*
|
||||
configurations.all {
|
||||
@@ -71,7 +78,7 @@ android {
|
||||
file("versionname.txt").text = androidGitVersion.name()
|
||||
file("versioncode.txt").text = androidGitVersion.code().toString()
|
||||
|
||||
minSdk 9
|
||||
minSdk 21
|
||||
targetSdk 35
|
||||
if (project.hasProperty("ANDROID_VERSION_CODE") && project.hasProperty("ANDROID_VERSION_NAME")) {
|
||||
versionCode ANDROID_VERSION_CODE
|
||||
@@ -137,9 +144,10 @@ android {
|
||||
cmake {
|
||||
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html
|
||||
arguments '-DANDROID=true',
|
||||
'-DANDROID_PLATFORM=android-16',
|
||||
'-DANDROID_PLATFORM=android-21',
|
||||
'-DANDROID_TOOLCHAIN=clang',
|
||||
'-DANDROID_CPP_FEATURES=',
|
||||
'-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON',
|
||||
'-DANDROID_STL=c++_static'
|
||||
}
|
||||
}
|
||||
@@ -154,11 +162,12 @@ android {
|
||||
cmake {
|
||||
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html
|
||||
arguments '-DANDROID=true',
|
||||
'-DANDROID_PLATFORM=android-16',
|
||||
'-DANDROID_PLATFORM=android-21',
|
||||
'-DANDROID_TOOLCHAIN=clang',
|
||||
'-DANDROID_CPP_FEATURES=',
|
||||
'-DANDROID_STL=c++_static',
|
||||
'-DANDROID_ARM_NEON=TRUE',
|
||||
'-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON',
|
||||
'-DGOLD=TRUE'
|
||||
}
|
||||
}
|
||||
@@ -174,10 +183,11 @@ android {
|
||||
cmake {
|
||||
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html
|
||||
arguments '-DANDROID=true',
|
||||
'-DANDROID_PLATFORM=android-16',
|
||||
'-DANDROID_PLATFORM=android-21',
|
||||
'-DANDROID_TOOLCHAIN=clang',
|
||||
'-DANDROID_CPP_FEATURES=',
|
||||
'-DANDROID_STL=c++_static',
|
||||
'-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON',
|
||||
'-DANDROID_LEGACY=TRUE'
|
||||
}
|
||||
}
|
||||
@@ -193,13 +203,15 @@ android {
|
||||
cmake {
|
||||
// Available arguments listed at https://developer.android.com/ndk/guides/cmake.html
|
||||
arguments '-DANDROID=true',
|
||||
'-DANDROID_PLATFORM=android-16',
|
||||
'-DANDROID_PLATFORM=android-21',
|
||||
'-DANDROID_TOOLCHAIN=clang',
|
||||
'-DANDROID_CPP_FEATURES=',
|
||||
'-DANDROID_STL=c++_static',
|
||||
'-DANDROID_ARM_NEON=TRUE',
|
||||
'-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON',
|
||||
'-DOPENXR=TRUE',
|
||||
'-DANDROID_LEGACY=TRUE'
|
||||
'-DANDROID_LEGACY=TRUE',
|
||||
'-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'
|
||||
}
|
||||
}
|
||||
ndk {
|
||||
|
||||
@@ -2,4 +2,5 @@ APP_STL := c++_static
|
||||
APP_PLATFORM := android-9
|
||||
APP_ABI := arm64-v8a armeabi-v7a x86_64
|
||||
APP_GNUSTL_CPP_FEATURES := exceptions
|
||||
APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true
|
||||
NDK_TOOLCHAIN_VERSION := clang
|
||||
|
||||
@@ -68,4 +68,6 @@ ifeq ($(TARGET_ARCH_ABI),arm64-v8a)
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ffmpeg/android/arm64/include
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ext/libadrenotools/include
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../../ext/libadrenotools/lib/linkernsbypass
|
||||
|
||||
LOCAL_LDFLAGS += "-Wl,-z,max-page-size=16384"
|
||||
endif
|
||||
|
||||
@@ -14,4 +14,8 @@ allprojects {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
// The below can be used to show more deprecated stuff in the build output.
|
||||
// tasks.withType(JavaCompile).configureEach {
|
||||
// options.compilerArgs << "-Xlint:deprecation"
|
||||
// }
|
||||
}
|
||||
|
||||
+1
-1
Submodule ffmpeg updated: 82049cca2e...654c7da2cc
Reference in New Issue
Block a user