From eda6687ac40b7c98e4167cc53eb1997ce94f9ad9 Mon Sep 17 00:00:00 2001 From: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:20:53 -0800 Subject: [PATCH] fix: link rstrtmgr in the MinGW launcher test build record.cpp pulls the Restart Manager in with an MSVC-only #pragma comment(lib); clang and gcc for MinGW ignore it, so the launcher tests failed to link with llvm-mingw (undefined RmStartSession, RmRegisterResources, RmGetList, RmEndSession), although the Linux runner's README says llvm-mingw works. The library is named explicitly for non-MSVC builds, inside the WRONGGPU_TESTING block, the only place record.cpp uses it: shipped builds are unchanged. Verified: wg-core-tests, launcher-core-tests, coexist-core-tests, wizard-policy-tests and WrongGPU now link with llvm-mingw 20261104 (before: ld.lld undefined symbols); line endings and git diff --check clean. Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com> --- clean/installer/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clean/installer/CMakeLists.txt b/clean/installer/CMakeLists.txt index d22e7f10..85930212 100644 --- a/clean/installer/CMakeLists.txt +++ b/clean/installer/CMakeLists.txt @@ -149,6 +149,10 @@ target_compile_definitions(wg_core PUBLIC ${PRESET_K_DEFINITION} ${DIRECT_ROUTE_ target_compile_definitions(wg_core PRIVATE ${MODEL_L_DEFINITION} ${MODEL_K_DEFINITION}) if(WRONGGPU_TESTING) target_compile_definitions(wg_core PUBLIC WRONGGPU_TESTING) + if(NOT MSVC) + # record.cpp's #pragma comment(lib, "rstrtmgr.lib") is MSVC-only; clang and gcc for MinGW need the library named + target_link_libraries(wg_core PUBLIC rstrtmgr) + endif() endif() target_link_libraries(wg_core PUBLIC wgc_core advapi32 user32 shell32 ole32 uuid winhttp) if(MSVC)