Fix the build logic to generate the native debug symbols

This commit is contained in:
Fredia Huya-Kouadio 2025-06-20 17:03:43 -07:00
parent 53be3b78d1
commit c376348b16
6 changed files with 36 additions and 24 deletions

View file

@ -97,12 +97,21 @@ if lib_arch_dir != "" and host_subpath != "":
else:
lib_tools_dir = ""
out_dir = "#platform/android/java/lib/libs/" + lib_tools_dir + lib_type_dir + "/" + lib_arch_dir
jni_libs_dir = "#platform/android/java/lib/libs/" + lib_tools_dir + lib_type_dir + "/"
out_dir = jni_libs_dir + lib_arch_dir
env_android.CommandNoCache(out_dir + "/libgodot_android.so", lib, Move("$TARGET", "$SOURCE"))
stl_lib_path = f"{env['ANDROID_NDK_ROOT']}/toolchains/llvm/prebuilt/{host_subpath}/sysroot/usr/lib/{triple_target_dir}/libc++_shared.so"
env_android.CommandNoCache(out_dir + "/libc++_shared.so", stl_lib_path, Copy("$TARGET", "$SOURCE"))
if env["debug_symbols"] and env["separate_debug_symbols"]:
debug_symbols_zip_file = (
("#bin/android-editor-" if env.editor_build else "#bin/android-template-")
+ lib_type_dir
+ "-native-symbols.zip"
)
env_android.NoCache(Zip(debug_symbols_zip_file, jni_libs_dir, ZIPROOT=Dir(jni_libs_dir)))
if env["generate_android_binaries"]:
env_android.AlwaysBuild(
env_android.CommandNoCache(