Commit graph

720 commits

Author SHA1 Message Date
Nobuyoshi Nakada
4a67ef09cc
[Feature #21116] Extract RJIT as a third-party gem 2025-02-13 18:01:03 +09:00
ydah
ccb4ba45ed Use LRAMA instead of YACC 2025-01-14 17:20:02 +09:00
Nobuyoshi Nakada
adbbc9109e
Win32: Update clean commands for bundled gems 2024-12-27 16:27:30 +09:00
Nobuyoshi Nakada
6be0ae35e8
Win32: Remove win32 directory if empty 2024-12-27 14:25:07 +09:00
Nobuyoshi Nakada
fb82f3a632 Win32: Defer change of timezone name encoding after 3.4
This change will be merged into 3.5 along with other encoding, command
line, environment variables, etc.

Revert following commits:

- bd831bcca5
  [Bug #20929] Win32: Use `wcsftime`

- 1c15f641cc
  [Bug #20929] Win32: Encode timezone name in UTF-8

- 78762b5218
  [Bug #20929] Fix `assert_zone_encoding`
2024-12-24 13:25:55 +09:00
Julien Marrec
be7e5f1f85 Implements [Feature #3456]: Support pkgconf on windows
1. Store the `PKG_CONFIG` variable in Makefile.sub (or try to get it from the ENV var PKG_CONFIG in mkmf.rb)
2. Try to use --msvc-syntax, with a fallback to replacing -Lxxx with -libpath:xxx. --msvc-syntax has been in pkgconf since 1.4.0 (released 7 years ago). pkg-config (freedesktop), does not support it, hence the fallback.
3. The `try_ldflags` passes these `ldflags` as the `opt` parameter to the `link_command`, not as `ldflags`. Unix systems are forgiving in that regard, MSVC is not: as a result as passing them as `opt`, they (specifically the `/libpath:xxx` ones) end up passed before the `-link` command to `cl.exe` and it throws because it ignores it and therefore can't find the lib.

```
cl : Command line warning D9002 : ignoring unknown option '-libpath:C:/Users/julien/.conan2/p/libff3726d89a6255c/p/lib'
```
2024-12-23 11:52:14 +09:00
Nobuyoshi Nakada
e1ff13b146
modular-gc-precheck for mswin 2024-12-22 22:10:26 +09:00
Nobuyoshi Nakada
2f2530b195
Allow variables in modular_gc_dir
Such as `$(ruby_version)`, `$(arch)` and so on.
2024-12-22 22:10:26 +09:00
Nobuyoshi Nakada
c25dd4ee47
Win32: Add coroutine for mswin on arm64 2024-12-17 20:25:06 +09:00
Nobuyoshi Nakada
36c36d0486
Win32: Allow arm64 platform 2024-12-17 20:25:05 +09:00
Nobuyoshi Nakada
f12e2622c1 Split system dependent commands to clean modular-gc 2024-12-10 12:31:47 +09:00
Nobuyoshi Nakada
1c15f641cc [Bug #20929] Win32: Encode timezone name in UTF-8 2024-12-06 18:59:38 +09:00
Nobuyoshi Nakada
029174a402
Win32: Use the symbolic name for the default NTVER
And embed the given `_WIN32_WINNT` in config.h as well, for extension
libraries.
2024-12-01 10:13:35 +09:00
Nobuyoshi Nakada
091c7d4a54
Win32: Make waring 4013 error
```
'function' undefined; assuming extern returning int
The compiler encountered a call to an undefined function.
```
2024-12-01 10:13:34 +09:00
Nobuyoshi Nakada
80cfa57234
[Feature #20563] Update required Windows version
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-22 19:01:55 +09:00
Nobuyoshi Nakada
a6fe3feacd
Win32: Remove unreferenced COMDAT from object files
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.
2024-11-17 19:29:16 +09:00
Nobuyoshi Nakada
a3bfddf96f
Win32: Refactor configurations
Pass configure options to the generated Makefile as-is.
2024-10-28 17:27:40 +09:00
Nobuyoshi Nakada
3aa044f10c
[Bug #20791] Set LIBRUBY_RELATIVE on mswin 2024-10-09 20:45:18 +09:00
Nobuyoshi Nakada
1f6d2e77d9
Remove leading spaces from LIBPATHFLAG and RPATHFLAG
Join with a space in `MakeMakefile#libpathflag` instead.
2024-09-29 23:07:16 +09:00
Silvio Traversaro
26a3de0dfd Define HAVE_ISINF for Visual Studio >= 2013
isinf is defined in Visual Studio since version 2013.
2024-09-20 12:20:27 +09:00
Nobuyoshi Nakada
ecb58a8d08
Fix prelude to use IBF
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-09-08 23:40:17 +09:00
Nobuyoshi Nakada
7845ab1bc9
[Bug #20687] Exclude just built ruby as baseruby
On Windows, an executable file in the current directory has the
priority to the PATH environment variable always.
2024-08-21 20:43:56 +09:00
Nobuyoshi Nakada
880b7f1513
Win32: Pass triplet option to vcpkg 2024-07-14 19:09:13 +09:00
Peter Zhu
e5d12f9cce Move gc_impl.c to gc/gc_impl.c
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-11 09:09:47 -04:00
Hiroshi SHIBATA
d70057d4b5 We couldn't use nmake before configure.bat 2024-06-26 12:31:02 +09:00
Hiroshi SHIBATA
797e1dfb83 Link dll files on install-vcpkg tasks 2024-06-26 12:31:02 +09:00
Hiroshi SHIBATA
2f76faaf51 Added tasks related vcpkg 2024-06-25 16:14:45 +09:00
Nobuyoshi Nakada
906a86e4de
Use dllexport as RUBY_FUNC_EXPORTED on Windows 2024-06-09 16:55:27 +09:00
Nobuyoshi Nakada
065190a973
[Bug #20524] win32: Try to configure GMP if available 2024-06-05 17:11:10 +09:00
Nobuyoshi Nakada
26bd4144f7
Add nightly recipe
Installs the last revision in the previous `RUBY_RELEASE_DATE`.
2024-06-02 18:36:09 +09:00
Nobuyoshi Nakada
ce20367a0e Define incflags also on mswin 2024-05-23 13:16:48 +09:00
Nobuyoshi Nakada
376ae22235
Manage required baseruby version in one place
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-31 00:54:38 +09:00
Nobuyoshi Nakada
5d71880df6 Embed manifest with VS2013 or later
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-03-13 02:34:12 +09:00
Nobuyoshi Nakada
90fe1b4402
Win32: Use TARGET_OS for word-size
It is derived from `_WIN64` pre-defined macro, at `-osname-` in
win32/setup.mak.
2024-02-11 22:00:12 +09:00
Nobuyoshi Nakada
ea2ea74a26
Win32: Copy coroutine no longer exists
At 42130a64f0, it has been replaced with
pthread implementation.
2024-02-11 20:03:18 +09:00
Nobuyoshi Nakada
aa36e44c05
Win32: Define HAVE_INTTYPES_H
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'
```
2024-02-11 19:34:13 +09:00
Nobuyoshi Nakada
22939382a8 [Bug #18286] Make builtin binary if sharable in universal binaries 2023-11-09 16:01:01 +09:00
Kevin Newton
3d0a46796b Rename YARP symbols to prism 2023-09-27 13:57:38 -04:00
Nobuyoshi Nakada
20bd19a9ad
Move YARP_BUILD_DIR to common.mk
It does not need to be an absolute path.
2023-09-21 18:18:27 +09:00
Takashi Kokubun
57dfd5c245 Revert "Fix tool/update-deps for YARP files"
This reverts commit 6fff5c5ba2.

Revert "Use $(top_srcdir) entries for mswin (#8244)"

This reverts commit e327bf32bd.

Revert "Update dependencies"

This reverts commit aba26a8804.

Revert "Use {$(VPATH)} for OpenBSD"

This reverts commit 2046e054bc.

---

None of those revisions actually worked for both mswin and OpenBSD at
the same time. I need more time to build something that works for both.
2023-08-18 01:12:41 -07:00
Takashi Kokubun
e327bf32bd
Use $(top_srcdir) entries for mswin (#8244)
While the $(VPATH) rules live in common.mk, mswin seems to ignore them.
We need to use $(VPATH) for OpenBSD, but we need to use the other one for mswin.
2023-08-18 00:48:13 -07:00
Nobuyoshi Nakada
b76c2ec005
Use :: form workflow commands 2023-08-15 23:30:40 +09:00
Takashi Kokubun
38be9a9b72
Clean up OPT_STACK_CACHING (#8132) 2023-07-27 17:27:05 -07:00
Jemma Issroff
d53e1f42ff [Feature #19741] Add yarp to builds
Add yarp to common.mk and windows builds to enable us to run yarp
correctly with CI.
2023-06-21 11:25:39 -07:00
Nobuyoshi Nakada
21b61b21c2
Fix the case no file under bin directory
NMake cannot handle empty expanded targets.
2023-06-02 16:58:55 +09:00
Yuichiro Kaneko
a1b01e7701
Use Lrama LALR parser generator instead of Bison
https://bugs.ruby-lang.org/issues/19637

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2023-05-12 18:25:10 +09:00
Nobuyoshi Nakada
39bbbd767d
Add rubyspec-capiext on mswin 2023-04-21 21:28:08 +09:00
Takashi Kokubun
2e875549a9 s/MJIT/RJIT/ 2023-03-06 23:44:01 -08:00
Takashi Kokubun
011c08b643 Remove obsoleted mjit_sp_inc.inc.erb 2023-03-06 23:05:50 -08:00
Nobuyoshi Nakada
899ea35035
Extract include/ruby/internal/attr/packed_struct.h
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the
macros bellow:
* `RBIMPL_ATTR_PACKED_STRUCT_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_END`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN`
* `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
2023-02-08 12:34:13 +09:00