[Fix] (ci): cache native compilation

This commit is contained in:
2026-06-22 09:24:21 +08:00
parent dac5f8964f
commit b87b698148
4 changed files with 91 additions and 2 deletions
+9
View File
@@ -18,6 +18,10 @@ def mobileGlLogActiveLevel = {
(rootProject.findProperty('mobilegl.logLevel') ?: System.getenv('MOBILEGL_LOG_ACTIVE_LEVEL') ?: 'MOBILEGL_LOG_LEVEL_INFO') as String
}
def mobileGlCmakeCompilerLauncher = {
(rootProject.findProperty('mobilegl.cmakeCompilerLauncher') ?: System.getenv('MOBILEGL_CMAKE_COMPILER_LAUNCHER') ?: '').toString().trim()
}
subprojects { subproject ->
subproject.plugins.withId('com.android.library') {
subproject.android {
@@ -30,6 +34,11 @@ subprojects { subproject ->
}
externalNativeBuild {
cmake {
def compilerLauncher = mobileGlCmakeCompilerLauncher()
if (!compilerLauncher.isEmpty()) {
arguments "-DCMAKE_C_COMPILER_LAUNCHER=${compilerLauncher}",
"-DCMAKE_CXX_COMPILER_LAUNCHER=${compilerLauncher}"
}
cppFlags "-DMOBILEGL_LOG_ACTIVE_LEVEL=${mobileGlLogActiveLevel()}"
}
}