summaryrefslogtreecommitdiff
path: root/win32
AgeCommit message (Collapse)Author
2018-12-10win32/Makefile.sub: missing dependency of mjit_config.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-08Fix compile error at r66280nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-03update-deps: support coroutine dependenciesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28Fix for coroutine/win32/Context.objnobu
* coroutine/win32/Context.asm: old ml version 9 needs CPU directive before `.model` directive. * win32/Makefile.sub: specify object directories to separate Win32 and Win64 targets. Win32 rule was overridden by Win64 rule and just ignored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28win32/Makefile.sub: add flags for ASnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-22io + socket: make pipes and sockets nonblocking by defaultnormal
All normal Ruby IO methods (IO#read, IO#gets, IO#write, ...) are all capable of appearing to be "blocking" when presented with a file description with the O_NONBLOCK flag set; so there is little risk of incompatibility within Ruby-using programs. The biggest compatibility risk is when spawning external programs. As a result, stdin, stdout, and stderr are now always made blocking before exec-family calls. This change will make an event-oriented MJIT usable if it is waiting on pipes on POSIX_like platforms. It is ALSO necessary to take advantage of (proposed lightweight concurrency (aka "auto-Fiber") or any similar proposal for network concurrency: https://bugs.ruby-lang.org/issues/13618 Named-pipe (FIFO) are NOT yet non-blocking by default since they are rarely-used and may introduce compatibility problems and extra syscall overhead for a common path. Please revert this commit if there are problems and if I am afk since I am afk a lot, lately. [ruby-core:89950] [Bug #14968] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-21configure.ac: add --disable-fiber-coroutine optionnobu
* configure.ac: add --disable-fiber-coroutine option, and disable it on x86-mingw32 for now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Make coroutine object directory for each archnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Fix typo and make directorynobu
* common.mk (coroutine/amd64/Context.$(OBJEXT)): fix a typo, $(OBJECT). * common.mk (coroutine/amd64): recipe to make object directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Support Visual C++ (mswin)samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-13gmake.mk: force updating revision.hnobu
Since `.revision.time` recipe needs `$(BASERUBY)`, it should not try to get updated unconditionally, or tarballs fail to build on environments where BASERUBY is not available. All developers who build frequently use GNU make anyway, don't you? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-11win32/setup.mak: Substitute slashes in `MJIT_CC`nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-11`MJIT_BUILD_DIR` is not used on Windowsnobu
Because `LOAD_RELATIVE` is always enabled on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-07Expand MJIT_CC on mswin toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20support --disable-mjit-support on mswin32/64.ko1
* win32/configure.bat: add --enable/disable-mjit-support configure.bat options. * win32/setup.mak: ditto. * win32/Makefile.sub: ditto. * win32/Makefile.sub: fix typo for congig.status file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20fix macro-name.ko1
* win32/Makefile.sub: Not MJIT_SUPPORT, but USE_MJIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20fix MJIT_SUPPORT on win32.ko1
* win32/Makefile.sub: add MJIT_SUPPORT macro for C codes and variable for Makefile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-20rename configure option `--disable-mjit` to `--disable-mjit-support`ko1
* configure.ac: rename configure option `--disable-mjit` to `--disable-mjit-support` because `--disable-mjit` is ambiguous that runtime MJIT default enable option or supporting MJIT features. `ENABLE_MJIT` is also renamed to `MJIT_SUPPORT` * Makefile.in: catch up this fix. * common.mk: ditto. * test/ruby/test_jit.rb: ditto. * win32/Makefile.sub: catch up this fix on mswin. * tool/mkconfig.rb: fix to pass `MJIT_SUPPORT` key. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-19configure.ac: add --disable-install-mjit-headerk0kubun
and substitute INSTALL_MJIT_HEADER. This would be convenient as a workaround for user if we found a platform that can't compile Ruby after Ruby 2.6.0 release. common.mk: Install MJIT header only when INSTALL_MJIT_HEADER Makefile.in: ditto win32/Makefile.sub: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13Define PRIdPTR etcnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13win32/win32.c: fix typo in comment [ci skip]k0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13win32/win32.c: I meant FindFreeChildSlot [ci skip]k0kubun
which was formerly used in CreateChild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-13win32/win32.c: don't call FindChildSlot in MJITk0kubun
worker. It's very likely to be thread-unsafe and so it's better to avoid using in MJIT worker to prevent surprises by race condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12win32/win32.c: drop always-NULL psa parameterk0kubun
I'm simplifying the interface of ChildRecord as I'm going to complicate it a little next. I didn't drop hInput since leaving it would be more natural as its interface. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-12mjit_worker.c: suppress child process's output properlyk0kubun
Prior to this commit, some of parent process's output was unintentionally suppressed. We couldn't suppress only child process's output with spawnvp. Instead of that, this commit uses CreateProcess directly to redirect stdout and stderr only for child process. As it's dealing with HANDLE returned from CreateProcess, now waitpid macro needs to CloseHandle it. win32/win32.c: Introduce rb_w32_start_process which is designed for MJIT worker. Other similar functions can't be used since they are using ALLOCV that may trigger GC, which should be avoided on MJIT worker. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11win32/Makefile.sub: generate MJIT header pdbk0kubun
in the MJIT-header-specific path, not default path like vc140.pdb. mjit_worker.c: specify the MJIT-header-specific pdb path. tool/rbinstall.rb: install MJIT header pdb as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-11win32/Makefile.sub: install MJIT header and objectk0kubun
to prefix. This is a retry of r64947. So this doesn't still make mswin MJIT on install directory succeed. One more step required. tool/rbinstall.rb: This change is needed to install headers correctly since the extensions are .obj and .pch, not .h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-08revert r64947 and r64949k0kubun
Both didn't work well on mswin. Reverting. https://ci.appveyor.com/project/ruby/ruby/builds/19322867/job/28fgwiq8j7hdmeu6 https://ci.appveyor.com/project/ruby/ruby/builds/19323721/job/1s73mrgu8n8wpa5f We need to revisit this to have MJIT header in a correct place, but having both in the place didn't make JIT on install directory functional either anyway... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07win32/Makefile.sub: create header install dir firstk0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-07win32/Makefile.sub: install precompiled header to prefixk0kubun
This is needed to run JIT from the installed ruby binary. Even after this, we're hitting another error though. start compilation: a@-e:1 -> C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c Starting process: cl cl -nologo -LD -DMJIT_HEADER -MD -Zi -W2 -wd4100 -wd4127 -wd4210 -wd4214 -wd4255 -wd4574 -wd4668 -wd4710 -wd4711 -wd4820 -wd4996 -we4028 -we4142 -O2sy- -Zm600 -DRUBY_EXPORT -I. -I.ext/include/x64-mswin64_140 -I../ruby/include -I../ruby -I../ruby/enc/unicode/10.0.0 -DRUBY_DEVEL=1 -DCANONICALIZATION_FOR_MATHN -D_WIN32_WINNT=0x0600 -FeC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.so -FoC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.obj -YuC:/usr/include/ruby-2.6.0/x64-mswin64_140/rb_mjit_header-2.6.0.pch C:/usr/include/ruby-2.6.0/x64-mswin64_140/rb_mjit_header-2.6.0.obj -TcC:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c -link -LIBPATH:C:/usr/lib x64-vcruntime140-ruby260.lib -incremental:no -debug -opt:ref -opt:icf -dll _ruby_mjit_p9712u0.c C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.c(1): error C2859: C:\usr\bin\vc140.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header. compile_c_to_so: compile error: 2 Failed to generate so: C:\Users\k0kubun\AppData\Local\Temp/_ruby_mjit_p9712u0.so git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-04Support ubasecrt.dll 10.0.17763.1 included in Windows 10 October 2018 Updateusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-21Suppress more -Wparentheses warningsnobu
[Fix GH-1958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-16Makefile.sub: remove -DRUBY_EXPORT overridden by -U optionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-07win32/Makefile.sub: escape `=` in MJIT cflagsk0kubun
Since `=` is considered as delimiter in `()` of `for`, having `-DRUBY_DEVEL=1` in CPPFLAGS had resulted in: #define MJIT_OPTFLAGS "-DMJIT_HEADER", \ "-DRUBY_DEVEL", \ "1", \ Even escaped `for %I in (... -DRUBY_DEVEL^=1)` does not yield an expected result. This commit is a workaround for this issue. After this commit, mjit_config.h will have: #define MJIT_OPTFLAGS "-DMJIT_HEADER", \ "-DRUBY_DEVEL" MJIT_CONFIG_ESCAPED_EQ "1", \ And C macro resolves MJIT_CONFIG_ESCAPED_EQ to "=". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-07win32/Makefile.sub: remove RUBY_EXPORT macrok0kubun
defined in XCFLAGS. This change resolves following link errors in MJIT: ``` rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cObject rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFalseClass rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFloat rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cInteger rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cNilClass rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cProc rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cString rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cSymbol rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cTrueClass rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eArgError rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNoMethodError rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNameError _ruby_mjit_p41476u0.obj : error LNK2001: unresolved external symbol rb_eFatal ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05mjit.c: link precompiled objectk0kubun
This is needed to resolve: "error LNK2011: precompiled object not linked in; image may not run" win32/Makefile.sub: Use the same flags as ones for precompiled header. This is needed to resolve: "error C2855: command-line option '/Z7' inconsistent with precompiled header" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05mjit.c: initialize prebuilt precompiled headerk0kubun
file name correctly. This allows to use the header installed by r64188. win32/Makefile.sub: define prebuilt precompiled header path instead of unused min header path git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04win32/Makefile.sub: build precompiled headerk0kubun
See the comment in win32/Makefile.sub. Not only .pch, but also .obj needs to be installed and used on runtime. .gitignore: ignore .pch that will be built by this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-31mjit.c: allow using MJIT header in build directoryk0kubun
when $MJIT_SEARCH_BUILD_DIR is set. If prefix path is owned by root, `make install` needs to be run by root. But in general we don't want to run `make test-all`, and also running `make test-all` currently fails due to permission tests of rdoc and rubygems. Thus, prior to this commit, specifying a prefix like "/usr/local" could mean there was no way to pass test-all. So we should not depend on `make install` for `make test-all`. Thus I reverted r64104 and r64103, and applied this workaround to pass `make test-all` without `make install`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-29mkexports.rb: flip-flopnobu
* win32/mkexports.rb (Exports::Mswin#each_export): get rid of flip-flop warning. [ruby-core:88147] [Bug #14946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-28win32.c: limit write size on consolenobu
* win32/win32.c (constat_parse): split long buffer and limit write size on a console, as well as rb_w32_write. [ruby-dev:50597] [Bug #14942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-09common.mk: codesign ruby-runner toonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-08benchmark: introduce benchmark_driver.gemk0kubun
Makefile.in: Clone benchmark-driver repository in benchmark/benchmark-driver `make update-benchmark-driver`, like simplecov. win32/Makefile.sub: Roughly do the same thing. .gitignore: Ignore the cloned repository. common.mk: Trigger `make update-benchmark-driver` to run `make benchmark` and adjust arguments for benchmark_driver.gem. benchmark/require.yml: renamed from benchmark/bm_require.rb, benchmark/prepare_require.rb benchmark/require_thread.yml: renamed from benchmark/bm_require_thread.rb, benchmark/prepare_require_thread.rb benchmark/so_count_words.yml: renamed from benchmark/bm_so_count_words.rb, benchmark/prepare_so_count_words.rb, benchmark/wc.input.base benchmark/so_k_nucleotide.yml: renamed from benchmark/bm_so_k_nucleotide.rb, benchmark/prepare_so_k_nucleotide.rb, benchmark/make_fasta_output.rb benchmark/so_reverse_complement.yml: renamed from benchmark/bm_so_reverse_complement.rb, benchmark/prepare_so_reverse_complement.rb, benchmark/make_fasta_output.rb I'm sorry but I made some duplications between benchmark/require.yml and benchmark/require_thread.yml, and between benchmark/so_k_nucleotide.yml and benchmark/so_reverse_complement.yml. If you're not comfortable with it, please combine these YAMLs to share the same prelude. One YAML file can have multiple benchmark definitions sharing prelude. benchmark/driver.rb: Replace its core feature with benchmark_driver.gem. Some old features are gone for now, but I'll add them again later. [Misc #14902] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05Revert "get rid of a compiler warning of VC"normal
Partially revert r63820. mjit.c seems to have different idea of "pid" type/size than the rest of Ruby on win32. As noted in [ruby-core:87794], this seems to break Greg's build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05unrevert r63852 but keep SIGCHLD path disabled for win32normal
Reading win32/win32.c waitpid implementation, maybe waitpid(-1, ...) on that platform will never conflict with mjit use of waitpid. In any case, I've added WAITPID_USE_SIGCHLD macro to vm_core.h so it can be easy for Linux/BSD users to test (hopefully!) win32-compatible code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Revert r63758 and related commitsnaruse
The change is unstable on Windows. Please re-commit it when it correctly supports Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02get rid of a compiler warning of VCusa
* mjit.c (exec_prcess): use PRI_PIDT_PREFIX for pid. * win32/Makefile.sub (PRI_PIDT_PREFIX): force to "I". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22remove DISABLE_RUBYGEMS from config filesnobu
* configure.ac: removed DISABLE_RUBYGEMS macro from config.h, not to rebuild everything when the flag changed. * configure.ac, win32/configure.bat: make USE_RUBYGEMS lowercase. * tool/mkconfig.rb: remove RUBYGEMS stuff from rbconfig.rb, not to reconfigure and rebuild all extension libraries. * Makefile.in (CPPFLAGS): enable/disable Rubygems by USE_RUBYGEMS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-15win32/Makefile.sub: gettimeofday is defined in win32.cnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e