gallivm: always use mkdir() instead of std::filesytem::create_directory()

Suse Linux Enterprise 15 is still on g++ 7.5 so std::filesystem
does not exist.  Just use mkdir() instead.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35841>
This commit is contained in:
Brian Paul 2025-06-27 09:17:06 -06:00 committed by Marge Bot
parent 248462cbe3
commit b85265bbc2

View file

@ -47,6 +47,7 @@
#include "util/u_math.h"
#include "util/u_debug.h"
#include "driver_ddebug/dd_util.h"
#include "lp_bld_debug.h"
#include "lp_bld_intr.h"
@ -57,9 +58,6 @@
#include <llvm/BinaryFormat/Dwarf.h>
#if !DETECT_OS_ANDROID
#include <filesystem>
#endif
/**
* Check alignment.
@ -379,11 +377,7 @@ 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);