ruby/win32
Pierrick Bouvier 784fdecc4c
windows-arm64 support (#8995)
* [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-23 17:17:28 +09:00
..
Makefile.sub [Bug #18286] Make builtin binary if sharable in universal binaries 2023-11-09 16:01:01 +09:00
configure.bat Add GMP support for mswin 2022-09-13 15:44:29 +09:00
dir.h [win32] Only include base windows types 2022-10-26 10:42:03 +09:00
enc-setup.mak
file.c Don't check for null pointer in calls to free 2023-06-30 09:13:31 -04:00
file.h Add `rb_w32_uspawn_process` 2023-09-25 22:57:28 +09:00
ifchange.bat Auto-generate the release date on version.h from git CommitDate (#6382) 2022-09-17 21:16:06 +09:00
makedirs.bat
mkexports.rb windows-arm64 support (#8995) 2023-11-23 17:17:28 +09:00
resource.rb Use class methods of `File` over `Kernel.open` and `IO.read` 2022-12-01 02:28:49 +09:00
rm.bat
rmdirs.bat
rtname.cmd
ruby.manifest [Win32] long path name support [Bug #12551] 2021-05-17 08:33:08 +09:00
setup.mak s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
win32.c windows-arm64 support (#8995) 2023-11-23 17:17:28 +09:00
winmain.c