mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
gh-125940: Android: support 16 KB pages (#125941)
Modify Android build tooling to use 16kB pages.
This commit is contained in:
parent
fed501d724
commit
e68d4b08ff
6 changed files with 28 additions and 20 deletions
|
|
@ -30,16 +30,6 @@ val PYTHON_VERSION = file("$PYTHON_DIR/Include/patchlevel.h").useLines {
|
|||
throw GradleException("Failed to find Python version")
|
||||
}
|
||||
|
||||
android.ndkVersion = file("../../android-env.sh").useLines {
|
||||
for (line in it) {
|
||||
val match = """ndk_version=(\S+)""".toRegex().find(line)
|
||||
if (match != null) {
|
||||
return@useLines match.groupValues[1]
|
||||
}
|
||||
}
|
||||
throw GradleException("Failed to find NDK version")
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
namespace = "org.python.testbed"
|
||||
|
|
@ -55,11 +45,22 @@ android {
|
|||
ndk.abiFilters.addAll(ABIS.keys)
|
||||
externalNativeBuild.cmake.arguments(
|
||||
"-DPYTHON_CROSS_DIR=$PYTHON_CROSS_DIR",
|
||||
"-DPYTHON_VERSION=$PYTHON_VERSION")
|
||||
"-DPYTHON_VERSION=$PYTHON_VERSION",
|
||||
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
|
||||
)
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
val androidEnvFile = file("../../android-env.sh").absoluteFile
|
||||
ndkVersion = androidEnvFile.useLines {
|
||||
for (line in it) {
|
||||
"""ndk_version=(\S+)""".toRegex().find(line)?.let {
|
||||
return@useLines it.groupValues[1]
|
||||
}
|
||||
}
|
||||
throw GradleException("Failed to find NDK version in $androidEnvFile")
|
||||
}
|
||||
externalNativeBuild.cmake {
|
||||
path("src/main/c/CMakeLists.txt")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id("com.android.application") version "8.4.2" apply false
|
||||
id("com.android.application") version "8.6.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "1.9.22" apply false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#Mon Feb 19 20:29:06 GMT 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue