From c824af45ff5dfd6c729243aa98fceaf76fde4dec Mon Sep 17 00:00:00 2001 From: dantdmdarealguy Date: Wed, 4 Nov 2026 11:16:46 -0600 Subject: [PATCH] fix(libSceAvPlayer): stage the built mimalloc DLL in the patched HTTP modules test avplayer_http_patched_modules copied mimalloc.dll from the mimalloc target's directory. mimalloc names its DLL after the build type, so a Debug build writes mimalloc-debug.dll and the test failed: file COPY_FILE failed to copy .../build-debug/3rdparty/mimalloc/mimalloc.dll because: No such file or directory (input) Pass the target file and copy it to mimalloc.dll in the stage, as the libs target does for the runtime libs/ directory. Linux registers the test without the allocator arguments and is unchanged. --- core/libs/prx/libSceAvPlayer/CMakeLists.txt | 2 +- core/libs/tests/AvPlayerHttpModules.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/libs/prx/libSceAvPlayer/CMakeLists.txt b/core/libs/prx/libSceAvPlayer/CMakeLists.txt index 5704db980e..514e6ed541 100644 --- a/core/libs/prx/libSceAvPlayer/CMakeLists.txt +++ b/core/libs/prx/libSceAvPlayer/CMakeLists.txt @@ -44,7 +44,7 @@ if(BUILD_TESTING) if(WIN32 AND TARGET mimalloc) add_dependencies(avplayer_http_patched_closure mimalloc pe_import_first) set(httpPatchedAllocatorArguments - -DALLOCATOR_DIRECTORY=$ + -DALLOCATOR=$ -DIMPORT_FIRST=$) endif() add_dependencies(avplayer_http_patched_modules_tests avplayer_http_patched_closure diff --git a/core/libs/tests/AvPlayerHttpModules.cmake b/core/libs/tests/AvPlayerHttpModules.cmake index 2eea029e12..8a9b3ad69e 100644 --- a/core/libs/tests/AvPlayerHttpModules.cmake +++ b/core/libs/tests/AvPlayerHttpModules.cmake @@ -52,10 +52,10 @@ foreach(index RANGE 0 5) endif() message("${output}${error}") endforeach() -if(WIN32 AND DEFINED ALLOCATOR_DIRECTORY) - foreach(allocator mimalloc.dll mimalloc-redirect.dll) - file(COPY_FILE "${ALLOCATOR_DIRECTORY}/${allocator}" "${stage}/${allocator}") - endforeach() +if(WIN32 AND DEFINED ALLOCATOR) + get_filename_component(allocatorDirectory "${ALLOCATOR}" DIRECTORY) + file(COPY_FILE "${ALLOCATOR}" "${stage}/mimalloc.dll") + file(COPY_FILE "${allocatorDirectory}/mimalloc-redirect.dll" "${stage}/mimalloc-redirect.dll") execute_process(COMMAND "${IMPORT_FIRST}" "${stage}/mimalloc.dll" mimalloc-redirect.dll RESULT_VARIABLE status OUTPUT_VARIABLE output ERROR_VARIABLE error) if(NOT status STREQUAL "0")