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.
This commit is contained in:
dantdmdarealguy committed 2026-11-04 12:23:35 -06:00
1 parent 9ab6a281ea
commit c824af45ff
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -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=$<TARGET_FILE_DIR:mimalloc>
-DALLOCATOR=$<TARGET_FILE:mimalloc>
-DIMPORT_FIRST=$<TARGET_FILE:pe_import_first>)
endif()
add_dependencies(avplayer_http_patched_modules_tests avplayer_http_patched_closure
+4 -4
View File
@@ -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")