summaryrefslogtreecommitdiff
path: root/win32
AgeCommit message (Collapse)Author
2024-12-01Win32: Use the symbolic name for the default NTVERNobuyoshi Nakada
And embed the given `_WIN32_WINNT` in config.h as well, for extension libraries. Notes: Merged: https://github.com/ruby/ruby/pull/12225
2024-12-01Win32: Make waring 4013 errorNobuyoshi Nakada
``` 'function' undefined; assuming extern returning int The compiler encountered a call to an undefined function. ``` Notes: Merged: https://github.com/ruby/ruby/pull/12225
2024-11-30Win32: Accept a symbolic name for `--with-ntver` optionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12224
2024-11-30[win32] fix arm64 instruction decodingjeremyd2019
Two minor fixes to arm64 instruction decoding when looking for __pioinfo: 1. add_mask was shifted by one bit, it was intended to be 0x7f800000. However, since the mask was already excluding matching the 'sh' bit, and since the purpose of the add following the adrp is to add in the lower 12 bits, I opted to set the mask to 0x7fc00000 and simply remove the handling for the 12 bit shift option which is now required to be disabled in order to match. 2. adrp's immediate was supposed to be sign extended. So far, I have not seen cases where the global variable ends up before the code in memory, but it's a possibility, so handle the sign extension. Notes: Merged: https://github.com/ruby/ruby/pull/12222
2024-11-24Fix `--empty` option of `ifchange`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/12159
2024-11-22[Feature #20563] Update required Windows versionNobuyoshi Nakada
Update the default `NTVER`, so that the declarations of APIs introduced since Windows 8 will be enabled. https://learn.microsoft.com/cpp/porting/modifying-winver-and-win32-winnt
2024-11-18win32/ifchange.bat: Remove code for old `command.com` [ci skip]Nobuyoshi Nakada
2024-11-18win32/ifchange.bat: Discard useless messageNobuyoshi Nakada
When the destination does not exist, `del` needs to do nothing.
2024-11-18win32/setup.mak: Remove unnecessary quotes and adjust quoting styleNobuyoshi Nakada
2024-11-17Win32: Expose wchar main routine onlyNobuyoshi Nakada
Warned if both of `main` and `wmain` are exposed: ``` LINK : warning LNK4067: ambiguous entry point; selected 'mainCRTStartup' ``` Notes: Merged: https://github.com/ruby/ruby/pull/12108
2024-11-17Win32: Remove unreferenced COMDAT from object filesNobuyoshi Nakada
Windows 11 SDK Version 10.0.26100.0 introduced a new internal inline function in ucrt/corecrt_math.h. Even it appears in object files and will be included in the DEF file, it will be removed from the DLL and result in a linker error. Notes: Merged: https://github.com/ruby/ruby/pull/12107
2024-11-17Workaround for VC 19.42.34433 againNobuyoshi Nakada
Prefix underscore is already removed here.
2024-11-17Workaround for VC 19.42.34433Nobuyoshi Nakada
Suddenly it began to add `_ucrt_int_to_float` by the recent version.
2024-11-16mkexports.rb: Revert removed flip-flopNobuyoshi Nakada
This reverts commit 63ae1e3cb5d302e5229143c00152328166d26780.
2024-10-28Win32: Refactor configurationsNobuyoshi Nakada
Pass configure options to the generated Makefile as-is.
2024-10-09[Bug #20791] Set LIBRUBY_RELATIVE on mswinNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/11848
2024-09-29Remove leading spaces from `LIBPATHFLAG` and `RPATHFLAG`Nobuyoshi Nakada
Join with a space in `MakeMakefile#libpathflag` instead. Notes: Merged: https://github.com/ruby/ruby/pull/11724
2024-09-24Windows: Remove compatibility to ancient MSVCRT APILars Kanis
Using _wputenv_s simplifies the code and we can avoid code duplication by using rb_w32_home_dir() to initialize ENV['HOME']. Notes: Merged: https://github.com/ruby/ruby/pull/7034
2024-09-20Define HAVE_ISINF for Visual Studio >= 2013Silvio Traversaro
isinf is defined in Visual Studio since version 2013. Notes: Merged: https://github.com/ruby/ruby/pull/3758
2024-09-12Add error checking to readdir, telldir, and closedir calls in dir.cJeremy Evans
Raise SystemCallError exception when these functions return an error. This changes behavior for the following case (found by the tests): ```ruby dir1 = Dir.new('..') dir2 = Dir.for_fd(dir1.fileno) dir1.close dir2.close ``` The above code is basically broken, as `dir1.close` closed the file descriptor. The subsequent `dir2.close` call is undefined behavior. When run in isolation, it raises Errno::EBADF after the change, but if another thread opens a file descriptor between the `dir1.close` and `dir2.close` calls, the `dir2.close` call could close the file descriptor opened by the other thread. Raising an exception is much better in this case as it makes it obvious there is a bug in the code. For the readdir check, since the GVL has already been released, reacquire it rb_thread_call_with_gvl if an exception needs to be raised. Due to the number of closedir calls, this adds static close_dir_data and check_closedir functions. The close_dir_data takes a struct dir_data * and handles setting the dir entry to NULL regardless of failure. Fixes [Bug #20586] Co-authored-by: Nobuyoshi Nakada <nobu.nakada@gmail.com> Notes: Merged: https://github.com/ruby/ruby/pull/11393 Merged-By: jeremyevans <code@jeremyevans.net>
2024-09-08Fix prelude to use IBFNobuyoshi Nakada
Since universal-parser and prism support, prelude code used functions inaccessible from outside libruby shared library. ``` linking goruby /usr/bin/ld: goruby.o: in function `prelude_eval': /home/runner/work/ruby/ruby/build/golf_prelude.c:221: undefined reference to `rb_ruby_prism_ptr' /usr/bin/ld: goruby.o: in function `pm_prelude_load': /home/runner/work/ruby/ruby/build/golf_prelude.c:192: undefined reference to `pm_options_line_set' /usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:193: undefined reference to `pm_parse_string' /usr/bin/ld: goruby.o: in function `prelude_eval': /home/runner/work/ruby/ruby/build/golf_prelude.c:224: undefined reference to `pm_iseq_new_with_opt' /usr/bin/ld: /home/runner/work/ruby/ruby/build/golf_prelude.c:226: undefined reference to `pm_parse_result_free' /usr/bin/ld: goruby.o: in function `prelude_ast_value': /home/runner/work/ruby/ruby/build/golf_prelude.c:181: undefined reference to `rb_ruby_ast_data_get' /usr/bin/ld: goruby.o: in function `prelude_eval': /home/runner/work/ruby/ruby/build/golf_prelude.c:231: undefined reference to `rb_ruby_ast_data_get' /usr/bin/ld: goruby.o: in function `pm_prelude_load': /home/runner/work/ruby/ruby/build/golf_prelude.c:196: undefined reference to `pm_parse_result_free' collect2: error: ld returned 1 exit status ```
2024-08-21[Bug #20687] Exclude just built ruby as baserubyNobuyoshi Nakada
On Windows, an executable file in the current directory has the priority to the PATH environment variable always.
2024-08-11fix i386-ucrt buildRaed Rizqie
Notes: Merged: https://github.com/ruby/ruby/pull/11358
2024-07-31[Feature #20563] Drop support for Windows older than 8/Sever 2012Nobuyoshi Nakada
Directly call APIs available on Windows 8/Server 2012 and later. Notes: Merged: https://github.com/ruby/ruby/pull/11279
2024-07-31[Feature #20563] Drop support for Windows older than Vista/2008Nobuyoshi Nakada
Directly call APIs available on Windows Vista/Server 2008 and later. Notes: Merged: https://github.com/ruby/ruby/pull/11279
2024-07-15Win32: Skip check for VS2022 FP BUG by defaultNobuyoshi Nakada
2024-07-14Win32: Pass triplet option to vcpkgNobuyoshi Nakada
2024-07-11Move gc_impl.c to gc/gc_impl.cPeter Zhu
This commit creates a new directory `gc` to put different GC implementations and moves the default GC from gc_impl.c to gc/gc_impl.c. The default GC can be easily switched using the `BUILTIN_GC` variable in Makefile.in.
2024-07-02[win32] Fallback release date when revision.h is not presentNobuyoshi Nakada
2024-06-26We couldn't use nmake before configure.batHiroshi SHIBATA
2024-06-26Link dll files on install-vcpkg tasksHiroshi SHIBATA
2024-06-25Added tasks related vcpkgHiroshi SHIBATA
2024-06-22Expand --with-opt-dir argumentsNobuyoshi Nakada
2024-06-09Use `dllexport` as `RUBY_FUNC_EXPORTED` on WindowsNobuyoshi Nakada
2024-06-05[Bug #20524] Do not define USE_GMP insteaad of setting to "no"Nobuyoshi Nakada
2024-06-05[Bug #20524] win32: Try to configure GMP if availableNobuyoshi Nakada
2024-06-02Add `nightly` recipeNobuyoshi Nakada
Installs the last revision in the previous `RUBY_RELEASE_DATE`.
2024-05-29Fix `calloc` arguments order for -Wcalloc-transposed-argsNobuyoshi Nakada
2024-05-23Define `incflags` also on mswinNobuyoshi Nakada
2024-03-31Manage required baseruby version in one placeNobuyoshi Nakada
Add a Ruby script mode to `tool/missing-baseruby.bat` that checks if `RUBY_VERSION` meets the required version. This will enable similar checks on mswin as well.
2024-03-13Embed manifest with VS2013 or laterNobuyoshi Nakada
Since VS2013, `link.exe` supports `-manifest:embed` option. [`/MANIFEST` (Create side-by-side assembly manifest)](https://learn.microsoft.com/en-us/cpp/build/reference/manifest-create-side-by-side-assembly-manifest?view=msvc-170&viewFallbackFrom=msvc-120)
2024-02-15Do not include a backtick in error messages and backtracesYusuke Endoh
[Feature #16495]
2024-02-12Win32: Include stdio.h for `printf`Nobuyoshi Nakada
2024-02-11Win32: Use `TARGET_OS` for word-sizeNobuyoshi Nakada
It is derived from `_WIN64` pre-defined macro, at `-osname-` in win32/setup.mak.
2024-02-11Win32: Copy coroutine no longer existsNobuyoshi Nakada
At 42130a64f02294dc8025af3a51bda518c67ab33d, it has been replaced with pthread implementation.
2024-02-11Win32: Define `HAVE_INTTYPES_H`Nobuyoshi Nakada
Suppress redefinition warnings, inttypes.h has been provided as well as stdint.h since `_MSC_VER` 1600 (= Visual C++ 10.0 = Visual Studio 2010). ``` C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(123): warning C4005: 'PRIdPTR': macro redefinition D:\a\ruby\ruby\src\include\ruby/backward/2/inttypes.h(51): note: see previous definition of 'PRIdPTR' C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(142): warning C4005: 'PRIiPTR': macro redefinition D:\a\ruby\ruby\src\include\ruby/backward/2/inttypes.h(52): note: see previous definition of 'PRIiPTR' C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(161): warning C4005: 'PRIoPTR': macro redefinition D:\a\ruby\ruby\src\include\ruby/backward/2/inttypes.h(53): note: see previous definition of 'PRIoPTR' C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(180): warning C4005: 'PRIuPTR': macro redefinition D:\a\ruby\ruby\src\include\ruby/backward/2/inttypes.h(54): note: see previous definition of 'PRIuPTR' C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(199): warning C4005: 'PRIxPTR': macro redefinition D:\a\ruby\ruby\src\include\ruby/backward/2/inttypes.h(55): note: see previous definition of 'PRIxPTR' C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(218): warning C4005: 'PRIXPTR': macro redefinition D:\a\ruby\ruby\src\include\ruby/backward/2/inttypes.h(56): note: see previous definition of 'PRIXPTR' ```
2023-11-23windows-arm64 support (#8995)Pierrick Bouvier
* [win32] fix compilation for windows-arm64 Credits to MSYS2 Ruby package using this patch. * [win32] nm use full options Fix compilation error when using MSYS2 environment. Credits to MSYS2 Ruby package using this patch. * [win32] detect llvm-windres (used for windows-arm64) When adding preprocessor option for llvm-windres (using clang as parameter), it fails. Thus, do not add this. It's needed to be able to compile windows-arm64 version, because MSYS2 toolchain is LLVM based (instead of GCC/binutils). * [win32] pioinfo detection for windows-arm64 This fixes "unexpected ucrtbase.dll" for native windows-arm64 ruby binary. It does not solve issue with x64 version emulated on this platform. Value of pioinfo pointer can be found in ucrtbase.dll at latest adrp/add sequence before return of _isatty function. This works for both release and debug ucrt. Due to the nature of aarch64 ISA (vs x86 or x64), it's needed to disassemble instructions to retrieve offset value, which is a bit more complicated than matching specific string patterns. Details about adrp/add usage can be found in this blog post: https://devblogs.microsoft.com/oldnewthing/20220809-00/?p=106955 For instruction decoding, the Arm documentation was used as a reference.
2023-11-09[Bug #18286] Make builtin binary if sharable in universal binariesNobuyoshi Nakada
2023-10-27[Feature #19244] Windows: Prefer USERPROFILE over HOMEPATH on startup as wellLars Kanis
2023-09-27Rename YARP symbols to prismKevin Newton