Use wide character startup

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
parent ed06f018bd
commit 74fcf43767
No known key found for this signature in database
GPG key ID: 3582D74E1FEE4465
4 changed files with 7 additions and 21 deletions

View file

@ -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)