From 2ff6563484a5ce9c9e69deac55015349bb32f1ec Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 23 Apr 2026 23:16:21 +0900 Subject: [PATCH] mruby-task: restore Windows link library dropped during HAL migration Commit be6413f0d86a ("mruby-task: migrate HAL to ports/ directories") moved the Windows HAL source into mruby-task/ports/win/ but dropped the linker.libraries declaration that previously lived in hal-win-task/mrbgem.rake. Both mingw and MSVC builds now fail to link task_hal.o/obj with undefined references to timeBeginPeriod, timeEndPeriod, timeSetEvent, and timeKillEvent. Re-declare winmm under a for_windows? guard. Co-authored-by: Claude --- mrbgems/mruby-task/mrbgem.rake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mrbgems/mruby-task/mrbgem.rake b/mrbgems/mruby-task/mrbgem.rake index 7c7b87a74..e753b3b41 100644 --- a/mrbgems/mruby-task/mrbgem.rake +++ b/mrbgems/mruby-task/mrbgem.rake @@ -5,4 +5,8 @@ MRuby::Gem::Specification.new('mruby-task') do |spec| # Enable task scheduler globally (required for vm.c integration) spec.build.defines << 'MRB_USE_TASK_SCHEDULER' + + if spec.for_windows? + spec.linker.libraries << "winmm" + end end