From 9fd6bae3c4dc7b96659ed2218bed450d54449435 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Tue, 3 Jun 2025 19:16:06 +0200 Subject: [PATCH] llvmpipe: Use mkdir instead of std::filesystem::create_directory on Android libc++fs symbols are not available to vendor modules up to Android 15 this patch allows to build llvmpipe as module for Android 14 and older Backport-to: 25.1 Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_debug.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp index a0e61f65e13..cc9de691b2d 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp @@ -43,6 +43,7 @@ #include #endif +#include "util/detect_os.h" #include "util/u_math.h" #include "util/u_debug.h" @@ -56,7 +57,9 @@ #include +#if !DETECT_OS_ANDROID #include +#endif /** * Check alignment. @@ -376,7 +379,11 @@ lp_function_add_debug_info(gallivm_state *gallivm, LLVMValueRef func, LLVMTypeRe if (!gallivm->file) { uint32_t shader_index = p_atomic_add_return(&global_shader_index, 1); +#if !DETECT_OS_ANDROID std::filesystem::create_directory(LP_NIR_SHADER_DUMP_DIR); +#else + mkdir(LP_NIR_SHADER_DUMP_DIR, 0755); +#endif asprintf(&gallivm->file_name, "%s/%u.nir", LP_NIR_SHADER_DUMP_DIR, shader_index);