From 34b7cc772fe8f61e8a0d075ca73c203d176722a7 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Wed, 26 Aug 2026 02:18:47 -0400 Subject: [PATCH] [Fix] (Build): compile fordebug native code as RelWithDebInfo (debuggable APK was shipping an -O0 libMobileGL.so, invalidating all performance measurements on this flavor) --- build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle b/build.gradle index effb0d2d..c724fcd1 100644 --- a/build.gradle +++ b/build.gradle @@ -31,6 +31,15 @@ android { } fordebug { debuggable true + // Keep the APK debuggable (simpleperf --app, JDWP) but build the + // native library like a release: AGP maps debuggable build types to + // CMAKE_BUILD_TYPE=Debug, which compiles MobileGL at -O0 and makes + // every performance measurement on this flavor meaningless. + externalNativeBuild { + cmake { + arguments "-DCMAKE_BUILD_TYPE=RelWithDebInfo" + } + } } } if (standalonePluginBuild) {