mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-task: use hal-win-task for mingw builds
mingw provides posix compatibility for file i/o but not for signal handling. hal-posix-task relies on SIGALRM, setitimer(), and sigprocmask() which are not available on windows even through mingw. changed hal selection for mruby-task to use hal-win-task for mingw, while mruby-dir, mruby-io, and mruby-socket correctly use posix hals for mingw since those features are supported. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -13,9 +13,12 @@ MRuby::Gem::Specification.new('mruby-task') do |spec|
|
||||
suggested_hal = if spec.build.primary_toolchain == 'visualcpp'
|
||||
# Visual C++ on Windows - use native Windows HAL
|
||||
'hal-win-task'
|
||||
elsif RUBY_PLATFORM =~ /linux|darwin|bsd|mingw/ ||
|
||||
(spec.build.kind_of?(MRuby::CrossBuild) && spec.build.host_target =~ /mingw/) ||
|
||||
spec.cc.command.to_s =~ /mingw/
|
||||
elsif (spec.build.kind_of?(MRuby::CrossBuild) && spec.build.host_target =~ /mingw/) ||
|
||||
spec.cc.command.to_s =~ /mingw/ ||
|
||||
RUBY_PLATFORM =~ /mingw/
|
||||
# MinGW provides POSIX I/O but NOT POSIX signals - use Windows HAL
|
||||
'hal-win-task'
|
||||
elsif RUBY_PLATFORM =~ /linux|darwin|bsd/
|
||||
'hal-posix-task'
|
||||
elsif spec.for_windows?
|
||||
'hal-win-task'
|
||||
|
||||
Reference in New Issue
Block a user