Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line
contains characters that are not supported in the active code page".
0d42217123/

Already Ruby builds `argv` in `rb_w32_sysinit`, instead of mswin- or
mingw-made `argv`.  Just bypass the conversion in mingw crt.
This commit is contained in:
Nobuyoshi Nakada 2024-11-04 09:39:15 +09:00
Родитель ed06f018bd
Коммит 74fcf43767
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3582D74E1FEE4465
4 изменённых файлов: 7 добавлений и 21 удалений

Просмотреть файл

@ -2,6 +2,8 @@ gnumake = yes
include Makefile
override EXE_LDFLAGS += -municode
DLLWRAP = @DLLWRAP@ --target=$(target_os) --driver-name="$(CC)"
ifeq (@USE_LLVM_WINDRES@,yes) # USE_LLVM_WINDRES
# llvm-windres fails when preprocessor options are added
@ -69,7 +71,7 @@ $(PROGRAM): $(RUBY_INSTALL_NAME).res.$(OBJEXT)
$(WPROGRAM): $(RUBYW_INSTALL_NAME).res.$(OBJEXT)
@rm -f $@
$(ECHO) linking $@
$(Q) $(PURIFY) $(CC) -mwindows -e $(SYMBOL_PREFIX)mainCRTStartup $(LDFLAGS) $(XLDFLAGS) \
$(Q) $(PURIFY) $(CC) -municode -mwindows -e $(SYMBOL_PREFIX)mainCRTStartup $(LDFLAGS) $(XLDFLAGS) \
$(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
$(STUBPROGRAM): $(RUBY_INSTALL_NAME).res.$(OBJEXT)

4
main.c
Просмотреть файл

@ -62,6 +62,10 @@ main(int argc, char **argv)
return rb_main(argc, argv);
}
#ifdef _WIN32
int wmain(void) {return main(0, NULL);}
#endif
#ifdef RUBY_ASAN_ENABLED
/* Compile in the ASAN options Ruby needs, rather than relying on environment variables, so
* that even tests which fork ruby with a clean environment will run ASAN with the right

Просмотреть файл

@ -1,9 +0,0 @@
if RUBY_PLATFORM.include?("mingw")
reason = <<~EOS
Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line
contains characters that are not supported in the active code page".
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0d42217123d3aec0341b79f6d959c76e09648a1e/
EOS
exclude(:test_inplace_nonascii, reason)
end

Просмотреть файл

@ -1,11 +0,0 @@
if RUBY_PLATFORM.include?("mingw")
reason = <<~EOS
Mingw crt-git 12.0.0.r369.g0d4221712-1 now prohibits "command line
contains characters that are not supported in the active code page".
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/0d42217123d3aec0341b79f6d959c76e09648a1e/
EOS
exclude(:test_chdir, reason)
exclude(:test_locale_codepage, reason)
exclude(:test_command_line_progname_nonascii, reason)
end